mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-02-01 15:23:03 +00:00
fix validate message errors
This commit is contained in:
parent
849e3348c1
commit
ca60c3bc15
@ -25,64 +25,64 @@ export default {
|
||||
WHERE_CONDITION_INVALID: 'where condition `%s`:`%s` is not valid',
|
||||
TABLE_NO_COLUMNS: 'table `%s` has no columns',
|
||||
NOT_SUPPORT_TRANSACTION: 'table engine is not support transaction',
|
||||
DATA_MUST_BE_ARRAY: 'data is not array list',
|
||||
DATA_MUST_BE_ARRAY: 'data is not an array list',
|
||||
PARAMS_TYPE_INVALID: 'params `{name}` type invalid',
|
||||
DISALLOW_PORT: 'proxy on, cannot visit with port',
|
||||
SERVICE_UNAVAILABLE: 'Service Unavailable',
|
||||
|
||||
validate_required: '{name} need is set',
|
||||
validate_contains: '{name} need contains the {args}',
|
||||
validate_equals: '{name} need matches the {args}',
|
||||
validate_different: '{name} can not matches the {args}',
|
||||
validate_after: '{name} is a date that\'s after the {args} (defaults to now)',
|
||||
validate_alpha: '{name} contains only letters (a-zA-Z)',
|
||||
validate_alphaDash: '{name} contains only letters and dashes(a-zA-Z_)',
|
||||
validate_alphaNumeric: '{name} contains only letters and numeric(a-zA-Z0-9)',
|
||||
validate_alphaNumericDash: '{name} contains only letters, numeric and dash(a-zA-Z0-9_)',
|
||||
validate_ascii: '{name} contains ASCII chars only',
|
||||
validate_base64: '{name} is base64 encoded',
|
||||
validate_before: '{name} is a date that\'s before the {args} (defaults to now)',
|
||||
validate_byteLength: '{name} length (in bytes) falls in {args}',
|
||||
validate_creditcard: '{name} is a valid credit card',
|
||||
validate_currency: '{name} is a valid currency amount',
|
||||
validate_date: '{name} is a date',
|
||||
validate_decimal: '{name} a decimal number',
|
||||
validate_divisibleBy: '{name} is a number that\'s divisible by {args}',
|
||||
validate_email: '{name} is an email',
|
||||
validate_fqdn: '{name} is a fully qualified domain name',
|
||||
validate_float: '{name} is a float in {args}',
|
||||
validate_fullWidth: '{name} contains any full-width chars',
|
||||
validate_halfWidth: '{name} contains any half-width chars',
|
||||
validate_hexColor: '{name} is a hexadecimal color',
|
||||
validate_hex: '{name} is a hexadecimal number',
|
||||
validate_ip: '{name} is an IP (version 4 or 6)',
|
||||
validate_ip4: '{name} is an IP (version 4)',
|
||||
validate_ip6: '{name} is an IP (version 6)',
|
||||
validate_isbn: '{name} is an ISBN (version 10 or 13)',
|
||||
validate_isin: '{name} is an ISIN (stock/security identifier)',
|
||||
validate_iso8601: '{name} is a valid ISO 8601 date',
|
||||
validate_in: '{name} in a array of {args}',
|
||||
validate_notIn: '{name} not in a array of {args}',
|
||||
validate_int: '{name} is an integer',
|
||||
validate_min: '{name} is an integer greater than {args}',
|
||||
validate_max: '{name} is an integer less than {args}',
|
||||
validate_length: '{name} length falls in {args}',
|
||||
validate_minLength: '{name} length is max than {args}',
|
||||
validate_maxLength: '{name} length is min than {args}',
|
||||
validate_lowercase: '{name} is lowercase',
|
||||
validate_mobile: '{name} is a mobile phone number',
|
||||
validate_mongoId: '{name} is a valid hex-encoded representation of a MongoDB ObjectId',
|
||||
validate_multibyte: '{name} contains one or more multibyte chars',
|
||||
validate_url: '{name} is an URL',
|
||||
validate_uppercase: '{name} is uppercase',
|
||||
validate_variableWidth: '{name} contains a mixture of full and half-width chars',
|
||||
validate_order: '{name} is valid sql order string',
|
||||
validate_field: '{name} is valid sql field string',
|
||||
validate_image: '{name} is valid image file',
|
||||
validate_startWith: '{name} start with {args}',
|
||||
validate_endWidth: '{name} end with {args}',
|
||||
validate_string: '{name} must be a string',
|
||||
validate_array: '{name} must be an array',
|
||||
validate_boolean: '{name} must be an boolean',
|
||||
validate_object: '{name} must be an object'
|
||||
validate_required: '{name} can not be blank',
|
||||
validate_contains: '{name} need contains {args}',
|
||||
validate_equals: '{name} need match {args}',
|
||||
validate_different: '{name} nedd not match {args}',
|
||||
validate_after: '{name} need a date that\'s after the {args} (defaults to now)',
|
||||
validate_alpha: '{name} need contains only letters (a-zA-Z)',
|
||||
validate_alphaDash: '{name} need contains only letters and dashes(a-zA-Z_)',
|
||||
validate_alphaNumeric: '{name} need contains only letters and numeric(a-zA-Z0-9)',
|
||||
validate_alphaNumericDash: '{name} need contains only letters, numeric and dash(a-zA-Z0-9_)',
|
||||
validate_ascii: '{name} need contains ASCII chars only',
|
||||
validate_base64: '{name} need a valid base64 encoded',
|
||||
validate_before: '{name} need a date that\'s before the {args} (defaults to now)',
|
||||
validate_byteLength: '{name} need length (in bytes) falls in {args}',
|
||||
validate_creditcard: '{name} need a valid credit card',
|
||||
validate_currency: '{name} need a valid currency amount',
|
||||
validate_date: '{name} need a date',
|
||||
validate_decimal: '{name} need a decimal number',
|
||||
validate_divisibleBy: '{name} need a number that\'s divisible by {args}',
|
||||
validate_email: '{name} need an email',
|
||||
validate_fqdn: '{name} need a fully qualified domain name',
|
||||
validate_float: '{name} need a float in {args}',
|
||||
validate_fullWidth: '{name} need contains any full-width chars',
|
||||
validate_halfWidth: '{name} need contains any half-width chars',
|
||||
validate_hexColor: '{name} need a hexadecimal color',
|
||||
validate_hex: '{name} need a hexadecimal number',
|
||||
validate_ip: '{name} need an IP (version 4 or 6)',
|
||||
validate_ip4: '{name} need an IP (version 4)',
|
||||
validate_ip6: '{name} need an IP (version 6)',
|
||||
validate_isbn: '{name} need an ISBN (version 10 or 13)',
|
||||
validate_isin: '{name} need an ISIN (stock/security identifier)',
|
||||
validate_iso8601: '{name} need a valid ISO 8601 date',
|
||||
validate_in: '{name} need in an array of {args}',
|
||||
validate_notIn: '{name} need not in an array of {args}',
|
||||
validate_int: '{name} need an integer',
|
||||
validate_min: '{name} need an integer greater than {args}',
|
||||
validate_max: '{name} need an integer less than {args}',
|
||||
validate_length: '{name} need length falls in {args}',
|
||||
validate_minLength: '{name} need length is max than {args}',
|
||||
validate_maxLength: '{name} need length is min than {args}',
|
||||
validate_lowercase: '{name} need is lowercase',
|
||||
validate_mobile: '{name} need is a mobile phone number',
|
||||
validate_mongoId: '{name} need is a valid hex-encoded representation of a MongoDB ObjectId',
|
||||
validate_multibyte: '{name} need contains one or more multibyte chars',
|
||||
validate_url: '{name} need an URL',
|
||||
validate_uppercase: '{name} need uppercase',
|
||||
validate_variableWidth: '{name} need contains a mixture of full and half-width chars',
|
||||
validate_order: '{name} need a valid sql order string',
|
||||
validate_field: '{name} need a valid sql field string',
|
||||
validate_image: '{name} need a valid image file',
|
||||
validate_startWith: '{name} need start with {args}',
|
||||
validate_endWidth: '{name} need end with {args}',
|
||||
validate_string: '{name} need a string',
|
||||
validate_array: '{name} need an array',
|
||||
validate_boolean: '{name} need a boolean',
|
||||
validate_object: '{name} need an object'
|
||||
};
|
||||
@ -25,64 +25,64 @@ export default {
|
||||
WHERE_CONDITION_INVALID: 'where condition `%s`:`%s` is not valid',
|
||||
TABLE_NO_COLUMNS: 'table `%s` has no columns',
|
||||
NOT_SUPPORT_TRANSACTION: 'table engine is not support transaction',
|
||||
DATA_MUST_BE_ARRAY: 'data is not array list',
|
||||
DATA_MUST_BE_ARRAY: 'data is not an array list',
|
||||
PARAMS_TYPE_INVALID: 'params `{name}` type invalid',
|
||||
DISALLOW_PORT: 'proxy on, cannot visit with port',
|
||||
SERVICE_UNAVAILABLE: 'Service Unavailable',
|
||||
|
||||
validate_required: '{name} need is set',
|
||||
validate_contains: '{name} need contains the {args}',
|
||||
validate_equals: '{name} need matches the {args}',
|
||||
validate_different: '{name} can not matches the {args}',
|
||||
validate_after: '{name} is a date that\'s after the {args} (defaults to now)',
|
||||
validate_alpha: '{name} contains only letters (a-zA-Z)',
|
||||
validate_alphaDash: '{name} contains only letters and dashes(a-zA-Z_)',
|
||||
validate_alphaNumeric: '{name} contains only letters and numeric(a-zA-Z0-9)',
|
||||
validate_alphaNumericDash: '{name} contains only letters, numeric and dash(a-zA-Z0-9_)',
|
||||
validate_ascii: '{name} contains ASCII chars only',
|
||||
validate_base64: '{name} is base64 encoded',
|
||||
validate_before: '{name} is a date that\'s before the {args} (defaults to now)',
|
||||
validate_byteLength: '{name} length (in bytes) falls in {args}',
|
||||
validate_creditcard: '{name} is a valid credit card',
|
||||
validate_currency: '{name} is a valid currency amount',
|
||||
validate_date: '{name} is a date',
|
||||
validate_decimal: '{name} a decimal number',
|
||||
validate_divisibleBy: '{name} is a number that\'s divisible by {args}',
|
||||
validate_email: '{name} is an email',
|
||||
validate_fqdn: '{name} is a fully qualified domain name',
|
||||
validate_float: '{name} is a float in {args}',
|
||||
validate_fullWidth: '{name} contains any full-width chars',
|
||||
validate_halfWidth: '{name} contains any half-width chars',
|
||||
validate_hexColor: '{name} is a hexadecimal color',
|
||||
validate_hex: '{name} is a hexadecimal number',
|
||||
validate_ip: '{name} is an IP (version 4 or 6)',
|
||||
validate_ip4: '{name} is an IP (version 4)',
|
||||
validate_ip6: '{name} is an IP (version 6)',
|
||||
validate_isbn: '{name} is an ISBN (version 10 or 13)',
|
||||
validate_isin: '{name} is an ISIN (stock/security identifier)',
|
||||
validate_iso8601: '{name} is a valid ISO 8601 date',
|
||||
validate_in: '{name} in a array of {args}',
|
||||
validate_notIn: '{name} not in a array of {args}',
|
||||
validate_int: '{name} is an integer',
|
||||
validate_min: '{name} is an integer greater than {args}',
|
||||
validate_max: '{name} is an integer less than {args}',
|
||||
validate_length: '{name} length falls in {args}',
|
||||
validate_minLength: '{name} length is max than {args}',
|
||||
validate_maxLength: '{name} length is min than {args}',
|
||||
validate_lowercase: '{name} is lowercase',
|
||||
validate_mobile: '{name} is a mobile phone number',
|
||||
validate_mongoId: '{name} is a valid hex-encoded representation of a MongoDB ObjectId',
|
||||
validate_multibyte: '{name} contains one or more multibyte chars',
|
||||
validate_url: '{name} is an URL',
|
||||
validate_uppercase: '{name} is uppercase',
|
||||
validate_variableWidth: '{name} contains a mixture of full and half-width chars',
|
||||
validate_order: '{name} is valid sql order string',
|
||||
validate_field: '{name} is valid sql field string',
|
||||
validate_image: '{name} is valid image file',
|
||||
validate_startWith: '{name} start with {args}',
|
||||
validate_endWidth: '{name} end with {args}',
|
||||
validate_string: '{name} must be a string',
|
||||
validate_array: '{name} must be an array',
|
||||
validate_boolean: '{name} must be an boolean',
|
||||
validate_object: '{name} must be an object'
|
||||
validate_required: '{name} can not be blank',
|
||||
validate_contains: '{name} need contains {args}',
|
||||
validate_equals: '{name} need match {args}',
|
||||
validate_different: '{name} nedd not match {args}',
|
||||
validate_after: '{name} need a date that\'s after the {args} (defaults to now)',
|
||||
validate_alpha: '{name} need contains only letters (a-zA-Z)',
|
||||
validate_alphaDash: '{name} need contains only letters and dashes(a-zA-Z_)',
|
||||
validate_alphaNumeric: '{name} need contains only letters and numeric(a-zA-Z0-9)',
|
||||
validate_alphaNumericDash: '{name} need contains only letters, numeric and dash(a-zA-Z0-9_)',
|
||||
validate_ascii: '{name} need contains ASCII chars only',
|
||||
validate_base64: '{name} need a valid base64 encoded',
|
||||
validate_before: '{name} need a date that\'s before the {args} (defaults to now)',
|
||||
validate_byteLength: '{name} need length (in bytes) falls in {args}',
|
||||
validate_creditcard: '{name} need a valid credit card',
|
||||
validate_currency: '{name} need a valid currency amount',
|
||||
validate_date: '{name} need a date',
|
||||
validate_decimal: '{name} need a decimal number',
|
||||
validate_divisibleBy: '{name} need a number that\'s divisible by {args}',
|
||||
validate_email: '{name} need an email',
|
||||
validate_fqdn: '{name} need a fully qualified domain name',
|
||||
validate_float: '{name} need a float in {args}',
|
||||
validate_fullWidth: '{name} need contains any full-width chars',
|
||||
validate_halfWidth: '{name} need contains any half-width chars',
|
||||
validate_hexColor: '{name} need a hexadecimal color',
|
||||
validate_hex: '{name} need a hexadecimal number',
|
||||
validate_ip: '{name} need an IP (version 4 or 6)',
|
||||
validate_ip4: '{name} need an IP (version 4)',
|
||||
validate_ip6: '{name} need an IP (version 6)',
|
||||
validate_isbn: '{name} need an ISBN (version 10 or 13)',
|
||||
validate_isin: '{name} need an ISIN (stock/security identifier)',
|
||||
validate_iso8601: '{name} need a valid ISO 8601 date',
|
||||
validate_in: '{name} need in an array of {args}',
|
||||
validate_notIn: '{name} need not in an array of {args}',
|
||||
validate_int: '{name} need an integer',
|
||||
validate_min: '{name} need an integer greater than {args}',
|
||||
validate_max: '{name} need an integer less than {args}',
|
||||
validate_length: '{name} need length falls in {args}',
|
||||
validate_minLength: '{name} need length is max than {args}',
|
||||
validate_maxLength: '{name} need length is min than {args}',
|
||||
validate_lowercase: '{name} need is lowercase',
|
||||
validate_mobile: '{name} need is a mobile phone number',
|
||||
validate_mongoId: '{name} need is a valid hex-encoded representation of a MongoDB ObjectId',
|
||||
validate_multibyte: '{name} need contains one or more multibyte chars',
|
||||
validate_url: '{name} need an URL',
|
||||
validate_uppercase: '{name} need uppercase',
|
||||
validate_variableWidth: '{name} need contains a mixture of full and half-width chars',
|
||||
validate_order: '{name} need a valid sql order string',
|
||||
validate_field: '{name} need a valid sql field string',
|
||||
validate_image: '{name} need a valid image file',
|
||||
validate_startWith: '{name} need start with {args}',
|
||||
validate_endWidth: '{name} need end with {args}',
|
||||
validate_string: '{name} need a string',
|
||||
validate_array: '{name} need an array',
|
||||
validate_boolean: '{name} need a boolean',
|
||||
validate_object: '{name} need an object'
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user