jqueryEasyUI自定义验证

$(document).ready(function(){ winUpdate = $('#windowUpdate').window({ closed:true }); windowAdd = $("#windowAdd").window({ closed:true }); //jquery easyUI的自定义正则 $.extend($.fn.validatebox.defaults.rules, { pricePattern: { validator: function(value, param){ return /^([1-9])([0-9])*(./d{1,2})?$/.test(value); }, message: 'Please enter characters like 10.00 ' }, datePattern: { validator: function(value, param){ return /^((((19|20)/d{2})-(0?(1|[3-9])|1[012])-(0?[1-9]|[12]/d|30))|(((19|20)/d{2})-(0?[13578]|1[02])-31)|(((19|20)/d{2})-0?2-(0?[1-9]|1/d|2[0-8]))|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))-0?2-29))$/.test(value); }, message: 'Please enter date like 2011-03-21 ' } });

 

 <input type="text" class="easyui-validatebox" name="budgetAmount" id="budgetAmountAdd" validType="pricePattern" required="true"/>

你可能感兴趣的:(Date,function,Class,input)