php user input validator class