Updated validation functions.