@yolain/validation
Version:
Validation library inspired by Laravel's Validator
50 lines (49 loc) • 2.54 kB
JavaScript
module.exports = {
accepted: 'The :attribute must be accepted.',
after: 'The :attribute must be after :after.',
after_or_equal: 'The :attribute must be equal or after :after_or_equal.',
alpha: 'The :attribute field must contain only alphabetic characters.',
alpha_dash: 'The :attribute field may only contain alpha-numeric characters, as well as dashes and underscores.',
alpha_num: 'The :attribute field must be alphanumeric.',
before: 'The :attribute must be before :before.',
before_or_equal: 'The :attribute must be equal or before :before_or_equal.',
between: 'The :attribute field must be between :min and :max.',
confirmed: 'The :attribute confirmation does not match.',
email: 'The :attribute format is invalid.',
date: 'The :attribute is not a valid date format.',
def: 'The :attribute attribute has errors.',
digits: 'The :attribute must be :digits digits.',
digits_between: 'The :attribute field must be between :min and :max digits.',
different: 'The :attribute and :different must be different.',
in: 'The selected :attribute is invalid.',
integer: 'The :attribute must be an integer.',
hex: 'The :attribute field should have hexadecimal format',
min: {
numeric: 'The :attribute must be at least :min.',
string: 'The :attribute must be at least :min characters.'
},
max: {
numeric: 'The :attribute may not be greater than :max.',
string: 'The :attribute may not be greater than :max characters.'
},
not_in: 'The selected :attribute is invalid.',
numeric: 'The :attribute must be a number.',
present: 'The :attribute field must be present (but can be empty).',
required: 'The :attribute field is required.',
required_if: 'The :attribute field is required when :other is :value.',
required_unless: 'The :attribute field is required when :other is not :value.',
required_with: 'The :attribute field is required when :field is not empty.',
required_with_all: 'The :attribute field is required when :fields are not empty.',
required_without: 'The :attribute field is required when :field is empty.',
required_without_all: 'The :attribute field is required when :fields are empty.',
same: 'The :attribute and :same fields must match.',
size: {
numeric: 'The :attribute must be :size.',
string: 'The :attribute must be :size characters.'
},
string: 'The :attribute must be a string.',
url: 'The :attribute format is invalid.',
regex: 'The :attribute format is invalid.',
attributes: {},
json:'The :attribute format is invalid'
};