wood burning stoves
The moose likes EJB and other Java EE Technologies and the fly likes Concatnating value of DTO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Concatnating value of DTO" Watch "Concatnating value of DTO" New topic

Concatnating value of DTO

divya sharma
Ranch Hand

Joined: Jan 25, 2007
Posts: 87

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.



I agree. Here's the link: http://aspose.com/file-tools
subject: Concatnating value of DTO
jQuery in Action, 3rd edition