Using Localized Resources with Enterprise Library 3 Validation
page 2 of 9
by Brian Mains
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 39032/ 104

Complexity with Globalization

Phone numbers are very tricky to validate.  The reason is that they come in a wide array of formats.  This is with every culture; for instance, in the United States you have home phone numbers, long distance phone numbers, toll free phone numbers, phone numbers with certain access codes, specialty numbers (like 911), and the like.  This is the same with other cultures; for instance, certain cultures have area codes ranging from two to five digits, with the higher-range area codes being specialty numbers.  This makes it really, really hard to process phone numbers.

However, in the approach I used, I plan to implement phone number validation for regular home phone use, including the multiple formats they appear in.  This makes it easier as a whole to process phone numbers.  Being that phone numbers are strictly digits makes it easier to process too.  That is where complexity for zip codes comes into play.

Zip codes can be alphanumeric, as is the case with Canada.  Canada has a six character/number zip code.  This makes it a challenge, but not as much as a challenge as phone numbers.  It was nice that there were several cultures used in this example that were very similar for zip codes, making it easier to implement.  There are some resources that did make developing these examples easier.





I apologize if the resource I used is wrong and that the translated text or the format is a message other than the intended one.

View Entire Article

User Comments

Title: Great Help   
Name: Tarun
Date: 2007-04-26 6:04:28 AM
well its really a good help regarding the Enterprise Library 3.0.

I want to same thing for Exception Application block in which i have to localized the exception messages.

Can any one please help me about it.



Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2021  |  Page Processed at 2021-03-05 2:40:16 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search