|
@@ -61,6 +61,10 @@ class Varchar(DataField):
|
61
|
61
|
if data_handler.max_length != self.max_length:
|
62
|
62
|
return False
|
63
|
63
|
return True
|
|
64
|
+
|
|
65
|
+ def _check_data_value(self, value):
|
|
66
|
+ error = None
|
|
67
|
+ return value, error
|
64
|
68
|
|
65
|
69
|
##@brief Data field designed to handle date & time
|
66
|
70
|
class DateTime(DataField):
|
|
@@ -77,6 +81,10 @@ class DateTime(DataField):
|
77
|
81
|
self.now_on_create = now_on_create
|
78
|
82
|
super().__init__(**kwargs)
|
79
|
83
|
|
|
84
|
+ def _check_data_value(self, value):
|
|
85
|
+ error = None
|
|
86
|
+ return value, error
|
|
87
|
+
|
80
|
88
|
##@brief Data field designed to handle long string
|
81
|
89
|
class Text(DataField):
|
82
|
90
|
help = 'A text field (big string)'
|
|
@@ -84,6 +92,10 @@ class Text(DataField):
|
84
|
92
|
|
85
|
93
|
def __init__(self, **kwargs):
|
86
|
94
|
super(self.__class__, self).__init__(ftype='text', **kwargs)
|
|
95
|
+
|
|
96
|
+ def _check_data_value(self, value):
|
|
97
|
+ error = None
|
|
98
|
+ return value, error
|
87
|
99
|
|
88
|
100
|
##@brief Data field designed to handle Files
|
89
|
101
|
class File(DataField):
|
|
@@ -96,3 +108,8 @@ class File(DataField):
|
96
|
108
|
def __init__(self, upload_path=None, **kwargs):
|
97
|
109
|
self.upload_path = upload_path
|
98
|
110
|
super().__init__(**kwargs)
|
|
111
|
+
|
|
112
|
+ def _check_data_value(self, value):
|
|
113
|
+ error = None
|
|
114
|
+ return value, error
|
|
115
|
+
|