Validation php class