-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathValidation.h
More file actions
33 lines (23 loc) · 828 Bytes
/
Validation.h
File metadata and controls
33 lines (23 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
Validation.h - Handle validation
Saul bertuccio 5 mar 2017
Released into the public domain.
*/
#ifndef Validation_h
#define Validation_h
#include "Arduino.h"
#include "Device.h"
#include "Key.h"
class Validation {
public:
static boolean isValidDeviceName(const String &device_name);
static boolean isValidDeviceType(const String &device_type);
static boolean isValidDeviceKeyName(const String &device_key_name);
static boolean isValidDeviceKeyLen(const String &device_key_len);
static boolean isValidDeviceKeyCode(const String &device_key_code);
static boolean isValidDeviceKeyHexCode(const String &device_key_code);
private:
static boolean parseAlphaNumString(const String &s, const int l);
static boolean parseNumericString(const String &s, const int l);
};
#endif