chariot-dev / chariot

IoT Sensor Framework
GNU Lesser General Public License v3.0
5 stars 4 forks source link

Can the ip address be validated better #52

Open Juan-Garcia96 opened 4 years ago

Juan-Garcia96 commented 4 years ago

'ipAddress': str, is an optional field for R420 So if i pass in "fdafs" validation does not detect a problem. Can this be enhanced?

enioluwas commented 4 years ago

They can probably be validated via regex. The supportedDevices file has that in mind but all regex validated fields have TODO as their value. That would help validation on the front end, but of course on the back end this calls for a mechanism to generalize validating all fields that need this kind of special validation.