data validation library js 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();
}