Extend the custom function to all type inputs

18 views
Skip to first unread message

OneZ

unread,
Dec 6, 2011, 6:43:27 PM12/6/11
to MooFloor
Hello All,

In current FormCheck, the input element does not accept the custom
function if it is a "child" type. For example, you can't custom to an
radio button. In order to extend the custom function to all type
inputs, it needs a small change as below.

In current version:
568 if(rule.match(/%[A-Z0-9\._-]+$/i) || (el.isOk &&
rule.match(/~[A-Z0-9\._-]+$/i))) {
569 if(eval(rule.slice(1)+'(el)') == false) {
570 el.isOk = false;
571 }

update to:
568 }
569 if(rule.match(/%[A-Z0-9\._-]+$/i) || (el.isOk &&
rule.match(/~[A-Z0-9\._-]+$/i))) {
570 if(eval(rule.slice(1)+'(el)') == false) {
571 el.isOk = false;

Good Luck!

OneZ

Reply all
Reply to author
Forward
0 new messages