validatorjs custom rule code example
Example: validatorjs get all errors
const afterValidation = new Validator(finalForm, validationRules);
if (afterValidation.fails()) {
const errorList = afterValidation.errors.all();
}
const afterValidation = new Validator(finalForm, validationRules);
if (afterValidation.fails()) {
const errorList = afterValidation.errors.all();
}