rtn validator
Validate a RTN (Routing transit number)
Options
Using with form field
Name | HTML attribute | Type | Description |
---|
message | data-fv-rtn___message | String | The error message |
Using with ES6 module
import rtn from 'formvalidation/dist/es6/validators/rtn';
const result = rtn().validate({
value: ...,
options: {
message: ...,
},
});
Basic example
ES6 Module Example
The following snippet shows how to use the rtn validator with ES6 module:
import rtn from 'formvalidation/dist/es6/validators/rtn';
const res1 = rtn().validate({
value: '011103093',
options: {
message: 'The value is not valid RTN',
},
});
const res2 = rtn().validate({
value: '054001726',
options: {
message: 'The value is not valid RTN',
},
});
See also