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

createQRCodeValidator

Creates a value validator for a specific QR Code encoding.

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

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

Parameters

encoding

QRCodeEncoding

Sets the QR Code encoding. Defaults to `ISO_8859_1`.

Returns

ValidatorFn

Returns a validator function. The function returns an error map with the `qrcode` property if the value is invalid. Otherwise, it returns `null`.
Not finding the help you need?
Contact Support