Hi I have following code for visual force and apex controller to render the checkbox. I have marked the checkbox as required="true". When I try to submit the page it give me cryptic error message.
Error Message:
j_id0:SPE: Validation Error: Value is required.
How do I modify this error message?
<apex:selectCheckboxes value="{!RegPeriod}" required="true" id="RegPerdId">
<apex:selectOptions value="{!RegistrationPeriod}"/>
</apex:selectCheckboxes>
Apex Controller:
public List<String> regPeriod = new List<String>();
public List<String> getRegPeriod(){
return regPeriod;
}
public void setRegPeriod(List<String> RegPrd){
regPeriod.addAll(RegPrd);
}
public List<SelectOption> RegistrationPeriod {
get {
List<SelectOption> listOfRegPeriod = new List<SelectOption>();
for(S_Period__c certiPeriod : listPeriod) {
listOfRegPeriod.add(new SelectOption( certiPeriod.Id, certiPeriod.Name));
}
return listOfRegPeriod;
}
set;
}