src/constants.ts
import { ValidationMessages } from './interfaces.js';
export const DEFAULT_MESSAGES: ValidationMessages = {
accepted: "This field must be accepted.",
alpha: "This field only allows alpha characters.",
alphaDash: "This field only allows alpha, dash and underscore characters.",
alphaNum: "This field only allows alpha, dash, underscore and numerical characters.",
alphaDashNum: "This field only allows alpha, dash, underscore, numerical and space characters.",
between: "This field must be between ${0} and ${1}",
betweenLength: "This field must be between ${0} and ${1} characters long.",
contains: "This field must be one of the following values: ${...}.",
dateBefore: "This field must be a date before ${0}.",
dateAfter: "This field must be a date after ${0}.",
different: "This field must not be the same as ${0}.",
digitsLength: "This field must be a numerical value and ${0} 'characters' long.",
digitsLengthBetween: "This field must be a numerical value and between ${0} and ${1} characters long.",
email: "This field must be a valid email address.",
ipvFour: "This field must be a valid IPv4 address.",
max: "This field must be equal to or less than ${0}.",
maxLength: "This field must be ${0} or less characters long.",
min: "This field must be equal to or more than ${0}.",
minLength: "This field must be ${0} or more characters long.",
notIn: "This field cannot be one of: ${...}.",
number: "This field must be a valid number.",
required: "This field is required.",
requiredIf: "This field is required if the value of ${0} equals {$1}.",
requiredIfNot: "This field is required if the value of ${0} does not equal {$1}.",
same: "This field must be the same value as ${0}.",
url: "This field must be a valid URL.",
pattern: "This field must match the regex pattern provided."
};