I want to add validation to the custom vf page which i created. there are input fields which should accept only alphabets, and few input fields which should accept only numericals. could anyone suggest the best way to do it ?
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Visualforce:
For only Numbers:
For only Letters:
Javascript:
Please refer to below link which might help you further:
http://salesforcelearn.blogspot.com/2016/04/javascript-function-for-validation-on.html
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas