Restrict Numbers And Special Characters In Visualforce Page Input Field
Biswajeet
March 31, 2020 0 Comments
Sample Code:
1 2 3 4 5 6 7 8 9 10 | < apex:page standardController = "Lead" docType = "html-5.0" > < apex:form > < apex:pageBlock > < apex:pageBlockSection > < apex:inputField id = "firstname" value = "{!Lead.FirstName}" onkeypress="return (event.charCode > 64 && event.charCode < 91 ) || (event.charCode > 96 && event.charCode < 123 )" /> < apex:inputField id = "lastname" value = "{!Lead.LastName}" onkeypress="return (event.charCode > 64 && event.charCode < 91 ) || (event.charCode > 96 && event.charCode < 123 )" /> </ apex:pageBlockSection > </ apex:pageBlock > </ apex:form > </ apex:page > |