Added validation logic for the application