An example code of how to implement a validation login incapsulated in a Visitor Design Pattern