Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

custom messages  RSS feed

 
Gajulapalli prathi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my code is:

<h:inputText styleClass="inputText" id="zip" style="width: 35px;" required="true">
<hx:validateConstraint regex="^[0-9]+$" /> </h:inputText>

when the user enters alphabets....i want to display the error message:"Zip code should contain only digits"

and if the name field is required field...then the message should be "u should enter a value for name field".

how can i display this error messages...
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Gajulapalli",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!