Hello,
I need validate NIF field (8 numbers + 1 letter)
for exemple like 12121212E
exist any class like?
validate['required','%nif']
for me it's enough validate 8 numbers + l letter, is not necessary verify that combination is ok.
really thanks...
I need validate NIF field (8 numbers + 1 letter)
for exemple like 12121212E
exist any class like?
validate['required','%nif']
for me it's enough validate 8 numbers + l letter, is not necessary verify that combination is ok.
really thanks...
Ok!
like this
thanks
like this
function dni(el){
if ( !el.value.test(/^[0-9]{8}[A-z]{1}$/) ) {
el.errors.push("Add an error message here");
return false;
} else {
return true;
}
}
thanks
I've tried this, but I don't get this to work. I use CFv5 with Joomla! 3.2.3 and in the element settings, tab validation, the custom function calls to dni function that it's written in Load Javascript on OnLoad event. What is it that I do wrong?
Hi Jaume,
Hmm. I think that Max has changed the way you add Custom Validation is CFv5. I believe that he has added a FAQ or a forum post telling you how to do it though. ( later I found this thread ).
Bob
Hmm. I think that Max has changed the way you add Custom Validation is CFv5. I believe that he has added a FAQ or a forum post telling you how to do it though. ( later I found this thread ).
Bob
This topic is locked and no more replies can be posted.