jQuery Validate Plugin - How to create a simple custom rule?

問題:

How do you create a simple, custom rule using the jQuery Validate plugin (using addMethod ) that doesn't use a regex?如何使用不使用正則表達式的 jQuery Validate 插件(使用addMethod )創建簡單的自定義規則?

For example, what function would create a rule that validates only if at least one of a group of checkboxes is checked?例如,什麼函數會創建一個規則,該規則僅在一組複選框中的至少一個被選中時才進行驗證?


解決方案:

參考一: https://en.stackoom.com/question/10jR
參考二: https://stackoom.com/question/10jR
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章