You need to sign in to do that
Don't have an account?

Need to validate inputText as date and Number
I am new bee in SF development.
I have apex input fields as
<apex:inputText value="{!Alert_MRR}" > <apex:inputText style="20%" value="{!Alert_Date}" maxlength="10">
In the validation class
The folling code validates if the alert_MRR is null similarily i want to check for number and date also in serverside
if(Alert_MRR== null ){ ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.FATAL, 'MRR is number.')); IsValid = false; }
Hi,
In Apex most of the times you dont have to write the validation code. Salesforce provides you with validation rules.
You can use <apex:inputField> in your code and can have a "Validation Rule" for it on your object. So that you will not require to do the validation in your apex code.
Hope this will help!!