jquery validation only digits

后端 未结 2 1351
别那么骄傲
别那么骄傲 2020-12-30 22:32

I am having the jquery.validate.js plugin and it is working fine for me.

My question is :

I am having a textbox and this textbox is mandatory and should only

相关标签:
2条回答
  • 2020-12-30 22:43

    to check it add

    $("#myform").validate({
      rules: {
        amount: {
          required: true,
          digits: true
        }
      }
    });
    

    http://docs.jquery.com/Plugins/Validation/Methods/digits

    0 讨论(0)
  • 2020-12-30 23:00
    $("#mobile_number").validate({
                rules: {
    
                    mobile_number: {required: true,number:true}
                },
                messages: {
                    mobile_number: {required: "Please Enter Your Mobile Number",number:"Please enter numbers Only"}
                }
    
     });
    
    0 讨论(0)
提交回复
热议问题