@ticatec/web-bean-validator
Version:
A TypeScript/JavaScript library for rule-based entity validation with boundary checking for strings, numbers, dates, enums, objects, and arrays.
16 lines (15 loc) • 707 B
JavaScript
import { i18nUtils } from "@ticatec/i18n";
const langRes = {
validation: {
required: `Please enter a value`,
stringShortage: `The value must be at least {{length}} characters long`,
earliestDate: "The value cannot be earlier than {{date}}",
finalDate: "The value cannot be later than {{date}}",
numberExceed: `The value cannot exceed {{max}}`,
numberShortage: `The value cannot be less than {{min}}`,
arrayExceed: `The value cannot contain more than {{length}} records`,
arrayShortage: `The value must contain at least {{length}} records`
}
};
const i18nRes = i18nUtils.createResourceProxy(langRes, 'ticatec');
export default i18nRes;