ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
validation.cpp File Reference
#include "validation.hpp"

Go to the source code of this file.

Functions

String validateUInt (const String &value, const String &name)
 Validate a string as an unsigned integer.
 
String validateFloat (const String &value, const String &name)
 Validate a string as a floating-point number.
 
String validateURL (const String &value)
 Validate a string as a URL.
 

Function Documentation

◆ validateFloat()

String validateFloat ( const String &  value,
const String &  name 
)

Validate a string as a floating-point number.

Parameters
valueThe string value to validate.
nameThe name of the value for error reporting.
Returns
An empty string if valid, or an error message if invalid.

Definition at line 15 of file validation.cpp.

References i.

Referenced by validateInputs().

◆ validateUInt()

String validateUInt ( const String &  value,
const String &  name 
)

Validate a string as an unsigned integer.

Parameters
valueThe string value to validate.
nameThe name of the value for error reporting.
Returns
An empty string if valid, or an error message if invalid.

Definition at line 3 of file validation.cpp.

References i.

Referenced by validateInputs().

◆ validateURL()

String validateURL ( const String &  value)

Validate a string as a URL.

Parameters
valueThe string value to validate.
nameThe name of the value for error reporting.
Returns
An empty string if valid, or an error message if invalid.

Definition at line 69 of file validation.cpp.

Referenced by validateInputs().