• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

wordings for error message

 
Mohan Mehra
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there is a name field ok. and it these are the conditions:
the first character should not be space followed by alphanumeric and no special characters allowed.

the above line is very long, i just want one short name for this conditions to display to the user when the user enters wrong characters in the name field
 
Nitin Surana
Ranch Hand
Posts: 129
Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Invalid data. E.g. data d23adsf.
 
rohit chavan
Ranch Hand
Posts: 132
Hibernate Java Oracle
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
split it up in 2-3 different messages(condition wise) and show appropriate message/s when user gives wrong input.



Hope it helps.
 
rohit chavan
Ranch Hand
Posts: 132
Hibernate Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rohit chavan wrote:split it up in 2-3 different messages(condition wise) and show appropriate message/s when user gives wrong input.



Hope it helps.


This is just a pseudo code...
 
Randall Twede
Ranch Hand
Posts: 4371
3
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Upper and lower case characters only.

or

Upper and lower case characters only(no spaces).
 
Winston Gutkowski
Bartender
Pie
Posts: 10268
60
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohan Mehra wrote:i just want one short name for this conditions to display to the user when the user enters wrong characters in the name field

Personally, I like Rohit's answer; however, you could eliminate one of your conditions by simply running String.trim() on the input, especially if you tell them in advance that this is what will happen, eg:
Please enter name (leading/trailing spaces will be ignored)

Winston
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, start with "" instead of null, or your error message will start with "null " - null will be turned into the String "null" when concatenated to a String.
 
Mohan Mehra
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks you all for the reply. it has helped me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic