validation and empty fields
I want to put a different message than "value is required" when user leaves a field empty.I know that a method in a bean for validation will not be called if field is empty. However I need to print a different message than "value is required". How can I do that?
More also can someone please explain me what the following code represents?
((UIInput)toValidate).setValid(false);
because thetoValidate cannot be recognised in my code.
Thanking you in advance...
[531 byte] By [
juanitaJa] at [2007-11-26 15:29:26]

# 2
Ok I did that.But because I have many components I want to have messages such as :
-Name is required
-Age is required
So I thought of adding in my Errors.properties the following:
javax.faces.component.UIInput.REQUIRED={0} is required
But I do not know where to define this {0} in my jsp . I tried to do the following but it didn't work
<h:inputText id="name" required="true" value="#{user.name}">
<f:param value=" Name field"/>
</h:inputText>[
Any suggestions?