Updated Validation for security