Javascript Function for Validation on Input fields ( Useful for Number,Letters,Characters,Currency validations)
Hi Guys, Many a times we have requirement where we need to have validation on Input field to let user enter just number, just letters or related to currency etc. Below you can find a single javascript function to handle all situation related to numbers, characters, currency, specialCharacters. Javascript code: <script type="text/javascript"> // This function is being used for providing different validation on your text box as per your need function inputLimiter(e,allow) { var AllowableCharacters = ''; if (allow == 'Letters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';} if (allow == 'Numbers'){AllowableCharacters='1234567890';} if (allow == 'NameCharacters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr...