Step by step validation class for PHP