A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
EJB and other Java EE Technologies
Author
Concatnating value of DTO
divya sharma
Ranch Hand
Joined: Jan 25, 2007
Posts: 87
posted
Oct 18, 2007 17:12:00
0
Hello,
In my from I have a 3 text box for SSN no like xxx-xx-xxxx but in database there is only one field. I have written a my validation like this...
String
customerSSN;
// validate Numeric value in SSN
customerSSN = dto.getCustomerSSN_1() + dto.getCustomerSSN_2()+ dto.getCustomerSSN_3();
if(customerSSN.trim().length()!= 0 && !Validator.containsNumbers(customerSSN,9)){
errors.add("customerSSN", new ActionMessage("error.SSN.required"));
}
It's working but dont know it looks very weired for me to create a new variable in the validation form. Please suggest me the alternative.
Thanks
Divya
Divya
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: Concatnating value of DTO
Similar Threads
Validations Spanning Multiple Pages
randomly pick 12 items with no duplicates
what is the good/standard way to inform client the parameter restriction/fomat
How to combine JSP <c:if> with JSF <f:validateLength>
Problems w/ a HashMap
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter