Changed the logic behind validations.