@resk/core
Version:
An innovative TypeScript framework that empowers developers to build applications with a fully decorator-based architecture for efficient resource management. By combining the power of decorators with a resource-oriented design, DecorRes enhances code cla
1 lines • 9.81 kB
JavaScript
;const n={validator:{accepted:"The {field} field must be accepted.",acceptedIf:"The {field} field must be accepted when {otherField} is {value}.",boolean:"The {field} field must be true or false.",declined:"The {field} field must be declined.",declinedIf:"The {field} field must be declined when {otherField} is {value}.",alpha:"The {field} field must only contain letters.",alphaDash:"The {field} field must only contain letters, numbers, dashes, and underscores.",alphaNum:"The {field} field must only contain letters and numbers.",ascii:"The {field} field must only contain single-byte alphanumeric characters and symbols.",confirmed:"The {field} field confirmation does not match.",email:"The {field} field must be a valid email address.",endsWith:"The {field} field must end with one of the following: {values}.",startsWith:"The {field} field must start with one of the following: {values}.",string:"The {field} field must be a string.",url:"The {field} field must be a valid URL.",lowercase:"The {field} field must be lowercase.",uppercase:"The {field} field must be uppercase.",between:"The {field} field must be between {min} and {max}.",decimal:"The {field} field must have {places} decimal places.",integer:"The {field} field must be an integer.",max:"The {field} field must not be greater than {max}.",min:"The {field} field must be at least {min}.",multipleOf:"The {field} field must be a multiple of {multiple}.",numeric:"The {field} field must be a number.",gt:"The {field} field must be greater than {compareValue}.",gte:"The {field} field must be greater than or equal to {compareValue}.",lt:"The {field} field must be less than {compareValue}.",lte:"The {field} field must be less than or equal to {compareValue}.",array:"The {field} field must be an array.",arrayKeys:"The {field} field contains invalid keys. Allowed keys: {allowedKeys}.",filled:"The {field} field must have a value.",in:"The selected {field} is invalid. Must be one of: {values}.",notIn:"The selected {field} is invalid. Must not be one of: {values}.",required:"The {field} field is required.",requiredIf:"The {field} field is required when {otherField} is {value}.",size:"The {field} field must have exactly {size} items.",distinct:"The {field} field has duplicate values.",present:"The {field} field must be present.",prohibited:"The {field} field is prohibited.",prohibitedIf:"The {field} field is prohibited when {otherField} is {value}.",prohibitedUnless:"The {field} field is prohibited unless {otherField} is {value}.",requiredUnless:"The {field} field is required unless {otherField} is one of {values}.",requiredWith:"The {field} field is required when {fields} is present.",requiredWithAll:"The {field} field is required when {fields} are present.",requiredWithout:"The {field} field is required when {fields} is not present.",requiredWithoutAll:"The {field} field is required when none of {fields} are present.",missing:"The {field} field must not be present.",missingIf:"The {field} field must not be present when {otherField} is {checkValue}.",missingUnless:"The {field} field must not be present unless {otherField} is {allowedValue}.",missingWith:"The {field} field must not be present when any of {fields} are present.",missingWithAll:"The {field} field must not be present when all of {fields} are present.",missingWithout:"The {field} field must not be present when any of {fields} are not present.",missingWithoutAll:"The {field} field must not be present when all of {fields} are not present.",different:"The {field} and {other} fields must be different.",same:"The {field} and {other} fields must match.",regex:"The {field} field format is invalid.",notRegex:"The {field} field format is invalid.",json:"The {field} field must be a valid JSON string.",hexColor:"The {field} field must be a valid hexadecimal color.",macAddress:"The {field} field must be a valid MAC address.",ip:"The {field} field must be a valid IP address.",ipv4:"The {field} field must be a valid IPv4 address.",ipv6:"The {field} field must be a valid IPv6 address.",invalidRuleParams:"Invalid parameters for {rule} rule on {field} field.",invalidType:"The {field} field must be of type {expectedType}.",invalidCompareField:"Invalid comparison field {compareField} for {field}.",invalidRegex:"Invalid regular expression pattern for {field}: {error}."}},o={validator:{accepted:"Le champ {field} doit \xEAtre accept\xE9.",acceptedIf:"Le champ {field} doit \xEAtre accept\xE9 quand {otherField} vaut {value}.",boolean:"Le champ {field} doit \xEAtre vrai ou faux.",declined:"Le champ {field} doit \xEAtre refus\xE9.",declinedIf:"Le champ {field} doit \xEAtre refus\xE9 quand {otherField} vaut {value}.",alpha:"Le champ {field} ne doit contenir que des lettres.",alphaDash:"Le champ {field} ne doit contenir que des lettres, chiffres, tirets et underscores.",alphaNum:"Le champ {field} ne doit contenir que des lettres et des chiffres.",ascii:"Le champ {field} ne doit contenir que des caract\xE8res ASCII.",confirmed:"La confirmation du champ {field} ne correspond pas.",email:"Le champ {field} doit \xEAtre une adresse email valide.",endsWith:"Le champ {field} doit se terminer par une des valeurs suivantes : {values}.",startsWith:"Le champ {field} doit commencer par une des valeurs suivantes : {values}.",string:"Le champ {field} doit \xEAtre une cha\xEEne de caract\xE8res.",url:"Le champ {field} doit \xEAtre une URL valide.",lowercase:"Le champ {field} doit \xEAtre en minuscules.",uppercase:"Le champ {field} doit \xEAtre en majuscules.",between:"Le champ {field} doit \xEAtre compris entre {min} et {max}.",decimal:"Le champ {field} doit avoir {places} d\xE9cimales.",integer:"Le champ {field} doit \xEAtre un entier.",max:"Le champ {field} ne doit pas \xEAtre sup\xE9rieur \xE0 {max}.",min:"Le champ {field} doit \xEAtre au moins {min}.",multipleOf:"Le champ {field} doit \xEAtre un multiple de {multiple}.",numeric:"Le champ {field} doit \xEAtre un nombre.",gt:"Le champ {field} doit \xEAtre sup\xE9rieur \xE0 {compareValue}.",gte:"Le champ {field} doit \xEAtre sup\xE9rieur ou \xE9gal \xE0 {compareValue}.",lt:"Le champ {field} doit \xEAtre inf\xE9rieur \xE0 {compareValue}.",lte:"Le champ {field} doit \xEAtre inf\xE9rieur ou \xE9gal \xE0 {compareValue}.",array:"Le champ {field} doit \xEAtre un tableau.",arrayKeys:"Le champ {field} contient des cl\xE9s invalides. Cl\xE9s autoris\xE9es : {allowedKeys}.",filled:"Le champ {field} doit avoir une valeur.",in:"Le {field} s\xE9lectionn\xE9 est invalide. Doit \xEAtre parmi : {values}.",notIn:"Le {field} s\xE9lectionn\xE9 est invalide. Ne doit pas \xEAtre parmi : {values}.",required:"Le champ {field} est requis.",requiredIf:"Le champ {field} est requis quand {otherField} vaut {value}.",size:"Le champ {field} doit avoir exactement {size} \xE9l\xE9ments.",distinct:"Le champ {field} a des valeurs dupliqu\xE9es.",present:"Le champ {field} doit \xEAtre pr\xE9sent.",prohibited:"Le champ {field} est interdit.",prohibitedIf:"Le champ {field} est interdit quand {otherField} vaut {value}.",prohibitedUnless:"Le champ {field} est interdit sauf si {otherField} vaut {value}.",requiredUnless:"Le champ {field} est requis sauf si {otherField} vaut une des valeurs {values}.",requiredWith:"Le champ {field} est requis quand {fields} est pr\xE9sent.",requiredWithAll:"Le champ {field} est requis quand {fields} sont pr\xE9sents.",requiredWithout:"Le champ {field} est requis quand {fields} n'est pas pr\xE9sent.",requiredWithoutAll:"Le champ {field} est requis quand aucun de {fields} n'est pr\xE9sent.",missing:"Le champ {field} ne doit pas \xEAtre pr\xE9sent.",missingIf:"Le champ {field} ne doit pas \xEAtre pr\xE9sent quand {otherField} vaut {checkValue}.",missingUnless:"Le champ {field} ne doit pas \xEAtre pr\xE9sent sauf si {otherField} vaut {allowedValue}.",missingWith:"Le champ {field} ne doit pas \xEAtre pr\xE9sent quand {fields} sont pr\xE9sents.",missingWithAll:"Le champ {field} ne doit pas \xEAtre pr\xE9sent quand tous {fields} sont pr\xE9sents.",missingWithout:"Le champ {field} ne doit pas \xEAtre pr\xE9sent quand {fields} ne sont pas pr\xE9sents.",missingWithoutAll:"Le champ {field} ne doit pas \xEAtre pr\xE9sent quand tous {fields} ne sont pas pr\xE9sents.",different:"Les champs {field} et {other} doivent \xEAtre diff\xE9rents.",same:"Les champs {field} et {other} doivent correspondre.",regex:"Le format du champ {field} est invalide.",notRegex:"Le format du champ {field} est invalide.",json:"Le champ {field} doit \xEAtre une cha\xEEne JSON valide.",hexColor:"Le champ {field} doit \xEAtre une couleur hexad\xE9cimale valide.",macAddress:"Le champ {field} doit \xEAtre une adresse MAC valide.",ip:"Le champ {field} doit \xEAtre une adresse IP valide.",ipv4:"Le champ {field} doit \xEAtre une adresse IPv4 valide.",ipv6:"Le champ {field} doit \xEAtre une adresse IPv6 valide.",invalidRuleParams:"Param\xE8tres invalides pour la r\xE8gle {rule} sur le champ {field}.",invalidType:"Le champ {field} doit \xEAtre de type {expectedType}.",invalidCompareField:"Champ de comparaison invalide {compareField} pour {field}.",invalidRegex:"Expression r\xE9guli\xE8re invalide pour {field} : {error}."}};function u(t,s){typeof window!="undefined"&&window.i18n&&window.i18n.addTranslations(t,s);}function f(){const t=[],s=(i,l="")=>{Object.keys(i).forEach(e=>{const d=l?`${l}.${e}`:e;typeof i[e]=="object"&&i[e]!==null?s(i[e],d):t.push(d);});};return s(n),t}function h(t){const s=f(),i=[],l=(e,d="")=>{Object.keys(e).forEach(r=>{const a=d?`${d}.${r}`:r;typeof e[r]=="object"&&e[r]!==null?l(e[r],a):i.push(a);});};return l(t),s.filter(e=>!i.includes(e))}exports.getLaravelValidationKeys=f;exports.laravelValidationTranslations=n;exports.laravelValidationTranslationsFr=o;exports.registerLaravelTranslations=u;exports.validateTranslationCompleteness=h;