New to Kendo UI for AngularStart a free 30-day trial

createQRCodeValidator

Creates a value validator for a particular Barcode type.

ts
const control = new FormControl('Фоо', createQRCodeValidator());
console.log(control.errors);

// {
//   qrcode: {
//     message: 'Unsupported character in QR Code: "Ф".',
//     value: '1234',
//     type: 'EAN13'
//   }
// }

Parameters

encoding

QRCodeEncoding

The QR Code encoding. Defaults to 'ISO_8859_1'.

Returns

ValidatorFn

A validator function that returns an error map with the `qrcode` property if the validation check fails, otherwise `null`.
Not finding the help you need?
Contact Support