@@ -104,7 +104,7 @@ public function isValid() {
104
104
}
105
105
106
106
public function isValidValue () {
107
- if (!empty ($ value ) && !ctype_digit ($ value )) {
107
+ if (!empty ($ this -> value ) && !ctype_digit ($ this -> value )) {
108
108
Session::addMessageAfterRedirect (__ ('This is not an integer: ' , 'formcreator ' ) . ' ' . $ this ->fields ['name ' ], false , ERROR );
109
109
return false ;
110
110
}
@@ -115,7 +115,7 @@ public function isValidValue() {
115
115
if (!$ parameters ['regex ' ]->isNewItem ()) {
116
116
$ regex = $ parameters ['regex ' ]->fields ['regex ' ];
117
117
if ($ regex !== null && strlen ($ regex ) > 0 ) {
118
- if (!preg_match ($ regex , $ value )) {
118
+ if (!preg_match ($ regex , $ this -> value )) {
119
119
Session::addMessageAfterRedirect (__ ('Specific format does not match: ' , 'formcreator ' ) . ' ' . $ this ->fields ['name ' ], false , ERROR );
120
120
return false ;
121
121
}
@@ -126,13 +126,13 @@ public function isValidValue() {
126
126
if (!$ parameters ['range ' ]->isNewItem ()) {
127
127
$ rangeMin = $ parameters ['range ' ]->fields ['range_min ' ];
128
128
$ rangeMax = $ parameters ['range ' ]->fields ['range_max ' ];
129
- if (strlen ($ rangeMin ) > 0 && $ value < $ rangeMin ) {
129
+ if (strlen ($ rangeMin ) > 0 && $ this -> value < $ rangeMin ) {
130
130
$ message = sprintf (__ ('The following number must be greater than %d: ' , 'formcreator ' ), $ rangeMin );
131
131
Session::addMessageAfterRedirect ($ message . ' ' . $ this ->fields ['name ' ], false , ERROR );
132
132
return false ;
133
133
}
134
134
135
- if (strlen ($ rangeMax ) > 0 && $ value > $ rangeMax ) {
135
+ if (strlen ($ rangeMax ) > 0 && $ this -> value > $ rangeMax ) {
136
136
$ message = sprintf (__ ('The following number must be lower than %d: ' , 'formcreator ' ), $ rangeMax );
137
137
Session::addMessageAfterRedirect ($ message . ' ' . $ this ->fields ['name ' ], false , ERROR );
138
138
return false ;
0 commit comments