Validation rewritten