Renamed validation function.
Added constants