simple PHP validation class