zoukankan      html  css  js  c++  java
  • formcheck 自定义验证

       
    POST提交前的验证:

      formcheck= new FormCheck('formular',{onSubmit:onsubmitfun});

     

      onSubmit:onsubmitfun提交前的验证function方法
          formcheck.options.submit=false时就不提交了

    自定义验证function方法:

      

      <input type="text" name="custom" class="validate['required','%customCheck">

      validate['required','%customCheck']

      

      customCheck自定义验证function方法
     
      function customCheck(el){
                    if (!el.value.test(/^[A-Z]/)) {
                        el.errors.push("Username should begin with an uppercase letter");
                        return false;
                    } else {
                        return true;
                    }
                }
  • 相关阅读:
    C++防止头文件反复包括
    yppasswd, ypchfn, ypchsh
    yes
    Yacc
    xxd
    xpdf -Portable Document Format(PDF)文件阅读器
    xinetd
    xargs
    x25, PF_X25
    write -在一个文件描述符上执行写操作
  • 原文地址:https://www.cnblogs.com/skyblue/p/2167744.html
Copyright © 2011-2022 走看看