I have the following:
<input class="required" name="nifpasaporte" id="nifpasaporte" type="text" placeholder="<?php echo JText::_('COM_CSTUDOMUS_NIFPASAPORTE');?>" value="<?php echo $userData->nifpasaporte ?>" required="required" aria-required="true" tabindex="7">
Using jQuery, how could I create a function which validates this input box only allowing to enter text and numbers (NO SPECIAL CHARACTERS).
For example:
function isnumeric(valor){
valor=valor.replace(",",".");
if (valor.match(/^[0-9]*\.*[0-9]+$/))
return true;
else
return false;
}
$or€