Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Refactoring validations

 
Wilker Iceri
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I have two classes for example:



I have two different objects(obj and obj2) with attribute email. Currently i use a method statis ValidatorUtil.isValidString()... for validate strings, etc.

What is the best way for encapsulate the validation? For i remove this from the login methods?

Thanks, and sorry for bad english
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic