📜 ⬆️ ⬇️

Vanadium: semantic validation on the client

Vanadium logo

Vanadium is a new validator for the client, which allows you to define the logic of semantic validation through a class attribute (class). On the main page of the project there are such examples as:
< input class =":required" type ="text" />
< input class =":integer" type ="text" />
< input class =":length;4" type ="text" />
< input class =":min_length;4" type ="text" />
< input class =":format;/^(vanadium)+$/i" type ="text" />
< input id ="pass" class =":ajax;/username_checker/check.json" type ="text" />
< input id ="pass" class =":email" type ="text" />
< input id ="pass" class =":required" type ="password" />< input class =":same_as;pass" type ="password" />


* This source code was highlighted with Source Code Highlighter .


Note from the translator: Also supported is the declaration of validation rules through JSON definitions and server validation (AJAX). JQuery required.
')

Source: https://habr.com/ru/post/70521/


All Articles