PHP validation class.