I've created a javascript function to block special characters...
function customTextValidation(text)
{
!(/^[A-zÑñ0-9]*$/i).test(text.value) ? text.value = text.value.replace(/[^A-zÑñ0-9]/ig, '') : null;
}
The issue I'm facing is that this function doesn't allow me to type blank spaces. How can I modify it to allow additional characters like blank spaces, ",", ".", ";", and more?
Thank you for your help!!