jQuery 的表單驗證插件:jQuery Form Validate
jQuery Form Validate 是一個 jQuery 的表單驗證插件,支持 HTML5 數據屬性的驗證。
- required() - Make it so form input is required.
- requiredIf( string element id ) - Require an input only if a dependent element has a value.
- betweenNumeric( float minimum, float maximum ) - See if a value is between a minimum and maximum value.
- numChars( int length ) - Validate that a string is exactly a certain number of characters in length.
- minChars( int minimum ) - Validate that a string is at least a certain number of characters in length.
- maxChars( int maximum ) - Validate that a string is no more than a certain number of characters in length.
- numOptions( int minimum ) - Make sure a user selects exactly the provided number of checkboxes or multi-select form inputs.
- minOptions( int minimum ) - Make sure a user selects at least a provided number of checkboxes or multi-select form inputs.
- maxOptions( int maximum ) - Make sure a user selects no more than a provided number of checkboxes or multi-select form inputs.
- email() - Make sure a user entered a valid email
- date( string format ) - Make sure the user entered a valid date in a valid date format. Format must be written as either "YYYY-MM-DD", "MM-DD-YYYY", or "DD-MM-YYYY".
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!