搜尋此網誌

2014-07-14

jQuery Validation

jQuery Validate
jQuery plugin: Validation
jQuery Validation Plugin


jQuery Validate 詳細使用說明 好用的表單驗證工具 – jQuery validation plugin
用 jQuery.Validate 製作中華民國身份證字號驗證程式
jQuery plugin Validation的7個Callback介紹


Exercise 4: Using Unobtrusive jQuery at Client Side
Creating a MVC 3 Application with Razor and Unobtrusive JavaScript
Unobtrusive Client Validation in ASP.NET MVC 3
Unobtrusive Ajax in ASP.NET MVC 3
MSDN Flash feature article: Unobtrusive JavaScript with jQuery, HTML 5 Style


jQuery Validation Plugin 1.9 預設忽略 hidden elements 的檢核






黑暗執行緒 Unobtrusive Validation
使用jQuery.validate.unobtrusive.js
謙卑式jQuery檢核範例-自訂規則

ASP.NET MVC unobtrusive Cheat Sheet

ASP.NET Web Forms 4.5的新特性(二):针对HTML5的更新和Unobtrusive Validation*****
Unobtrusive JavaScript in ASP.NET MVC 3






What does this.optional(element) do when adding a jQuery validation method?
this.optional(element):當element沒有值,且不為required時,回傳true
jQuery.extend的用法

Examining the Edit Methods and Edit View
        $.validator.methods.number = function (value, element) {
            return this.optional(element) || !isNaN(Globalize.parseFloat(value));
        }

        $(document).ready(function () {
            Globalize.culture('fr-FR');
        });

        jQuery.extend(jQuery.validator.methods, {    
            range: function (value, element, param) {        
                var val = $.global.parseFloat(value);
                return this.optional(element) || (val >= param[0] && val <= param[1]);
            }
        });

搭配globalize.js可能會發生bundles order 排序問題:
ASP.NET MVC - Bundle Config order

沒有留言: