• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Concatnating value of DTO

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic