< input cl...">

バナジウム:クライアントでのセマンティック検証

バナジウムのロゴ



Vanadiumは、クラス属性を介してセマンティック検証ロジックを定義できる新しいクライアントバリデーターです。 プロジェクトのメインページには、次のような例があります。

< 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 .








翻訳者からの注意:JSON定義とサーバー検証(AJAX)による検証ルールの宣言もサポートされています。 jQueryが必要です。






All Articles