Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to avoid if else blocks  RSS feed

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


here is one of my validator classes. I am wondering if there is any better way to handle such simple validation rules and avoid all these if else blocks can I follow any design pattern or can I use any scripting language which can make this simple to read
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!