meid validator
Validate a MEID (mobile equipment identifier)
Options
Using with form field
Name | HTML attribute | Type | Description |
---|
message | data-fv-meid___message | String | The error message |
Using with ES6 module
import meid from 'formvalidation/dist/es6/validators/meid';
const result = meid().validate({
value: ...,
options: {
message: ...,
},
});
Basic example
ES6 Module Example
The following snippet shows how to use the meid validator with ES6 module:
import meid from 'formvalidation/dist/es6/validators/meid';
const res1 = meid().validate({
value: 'A00000049259B16',
options: {
message: 'The value is not valid MEID',
},
});
const res2 = meid().validate({
value: '2936087365007037101',
options: {
message: 'The value is not valid MEID',
},
});
See also
Changelog
- Fix an issue that the meid validator passes an invalid MEID which ends with 0