• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to validate country and State  RSS feed

 
sunaina agarwal
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Here is my html code for a drop down menu for country and state. corresponding states populates dynamically on selecting a country.
Now i want to validate it in my register servlet how can i do it?? Please help me regarding this asap.
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote: but beware: What about places which don't have a street address? You might have Manor Farm, Great Badding. Name of place, and no street. You have to consider that a valid address here in Britain.


A couple of days ago I tried to register on a site that needed a delivery address. The first field was mandated as the house number but I don't have one; I just have a house name. I tried to use my house name but the field would only accept numerics. Interestingly it would accept a house number of 000000 ! I gave up and went to a different supplier.

(Note: this post is a reply to this one in Sunaina's original thread - Winston)
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sunaina agarwal wrote:Here is my html code for a drop down menu for country and state. corresponding states populates dynamically on selecting a country. Now i want to validate it in my register servlet how can i do it??

Well, as I recall, the selection process puts the selected value in the URL.

Beyond that, the only advice I can give is to use existing standards; and the one for countries and states is ISO-3166 - specifically: ISO 3166-2.

Please help me regarding this asap.

Please EaseUp (←click). Urgency is your problem, not ours; and we're all volunteers here.

Winston
 
Himachandra Challagundla
Greenhorn
Posts: 3
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Validate the values with by passing parameter through config file and access it in Action class to validate.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!