validatorjs2
Version:
Validation library inspired by Laravel's Validator
55 lines (53 loc) • 3.13 kB
JavaScript
require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({"./lang/en":[function(require,module,exports){
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: {
numeric: 'The :attribute field must be between :min and :max.',
string: 'The :attribute field must be between :min and :max characters.',
},
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: {}
};
},{}]},{},[]);