@bshg/validation
Version:
Validation Library for TypeScript projects
116 lines (115 loc) • 4.89 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.en = void 0;
exports.en = {
noMessage: "No Error Message Was Provided!",
string: {
required: "This field is required!",
notEmpty: "This field is required!",
min: "Minimum length required is %1",
max: "Maximum length allowed is %1",
includes: "Must include \"%1\"",
includesAll: "Must include all of: %1",
startsWith: "Must start with \"%1\"",
endsWith: "Must end with \"%1\"",
matches: "Does not match the required pattern",
email: "Invalid email format",
phone: "Invalid phone format",
url: "Invalid URL format",
date: "Invalid date format",
time: "Invalid time format",
hexColor: "Invalid hex color format",
creditCard: "Invalid credit card number format",
htmlTag: "Invalid HTML tag format",
base64: "Invalid Base64 format",
alphanumeric: "Must contain only alphanumeric characters",
numeric: "Must contain only numeric characters",
alpha: "Must contain only alphabetic characters",
as: "Value must be as '%1'",
},
number: {
required: "This field is required!",
min: "Value must be greater than or equal to %1",
max: "Value must be less than or equal to %1",
range: "Value must be between %1 and %2",
integer: "Value must be an integer",
positive: "Value must be positive",
negative: "Value must be negative",
decimal: "Value must be a decimal number",
multipleOf: "Value must be a multiple of %1",
betweenExclusive: "Value must be between %1 (exclusive) and %2 (exclusive)",
even: "Value must be an even number",
odd: "Value must be an odd number",
positiveInteger: "Value must be a positive integer",
negativeInteger: "Value must be a negative integer",
positiveDecimal: "Value must be a positive decimal number",
negativeDecimal: "Value must be a negative decimal number",
divisibleBy: "Value must be divisible by %1",
perfectSquare: "Value must be a perfect square",
primeNumber: "Value must be a prime number",
fibonacciNumber: "Value must be a Fibonacci number",
powerOfTwo: "Value must be a power of two",
as: "value must be as '%1'",
},
boolean: {
required: "This field is required!",
true: "Value must be true",
false: "Value must be false",
equals: "Value must be equal to %1",
as: "value must be as '%1'",
},
array: {
length: "Value must be of length %1",
min: "Minimum length required is %1",
max: "Maximum length allowed is %1",
has: "Value must include %1",
hasAll: "Value must include all of: %1",
hasAny: "Value must include any of: %1",
hasNone: "Value must include none of: %1",
some: "Array does not match the given predicate!",
every: "Array does not match the given predicate!",
},
datetime: {
required: "This field is required!",
equals: "value must be %1",
after: "DateTime must be after %1",
before: "DateTime must be before %1",
between: "DateTime must be between %1 and %2",
todayOrAfter: "DateTime must be today or after today",
todayOrBefore: "DateTime must be today or before today",
past: "DateTime must be in the past",
future: "DateTime must be in the future",
weekday: "DateTime must be a weekday",
weekend: "DateTime must be a weekend",
as: "Value must be as '%1'",
},
date: {
required: "This field is required!",
equals: "value must be %1",
after: "Date must be after %1",
before: "Date must be before %1",
between: "Date must be between %1 and %2",
todayOrAfter: "Date must be today or after today",
todayOrBefore: "Date must be today or before today",
past: "Date must be in the past",
future: "Date must be in the future",
weekday: "Date must be a weekday",
weekend: "Date must be a weekend",
leapYear: "Date must be in a leap year",
sameDayAs: "Date must be the same day as %1",
as: "value must be as '%1'",
},
time: {
required: "This field is required!",
equals: "value must be %1",
after: "Time must be after %1",
before: "Time must be before %1",
between: "Time must be between %1 and %2",
nowOrAfter: "Time must be now or after now",
nowOrBefore: "Time must be now or before now",
past: "Time must be in the past",
future: "Time must be in the future",
within24Hours: "Time must be within the next 24 hours",
as: "value must be as '%1'",
},
};