horprogs / Just-validate

Modern, simple, lightweight (~5kb gzip) form validation library written in Typescript, with no dependencies (no JQuery!). Support a wide range of predefined rules, async, files, dates validation, custom error messages and styles, localization. Support writing custom rules and plugins.

Home Page:https://just-validate.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't have this regexp to work whatsoever

Cholo981 opened this issue · comments

It works with an HTML5 validator, not here.
.addField('#CodiceFiscale', [ { rule: 'customRegexp', value: /^([A-Za-z]{6}[0-9lmnpqrstuvLMNPQRSTUV]{2}[abcdehlmprstABCDEHLMPRST]{1}[0-9lmnpqrstuvLMNPQRSTUV]{2}[A-Za-z]{1}[0-9lmnpqrstuvLMNPQRSTUV]{3}[A-Za-z]{1})|([0-9]{11})$|^(STP|stp|stP|sTP|sTp|STp|Stp|StP|ENI|eni|enI|eNI|eNi|ENi|Eni|EnI)(\d{13})$|^\d{11}$/, }, { rule: 'required' } ])