Fixed input validation for sensor edit and create