Add input validation for salinity resource