Reputation: 5367
So I have this simple form validation on a text input.
Been doing some Googlin' and can't find how to limit any special characters - meaning I want to prevent the use of anything besides alphanumeric characters.
I want to include it in this function... anyone?
if (!campaign_name || !'^[a-zA-Z 0-9]+$'){
//alert('Please enter campaign name');
// Do nothing
return false;
};
Upvotes: 1
Views: 4645