Skip to content

Commit

Permalink
Validator::EMPTY_NULL is not a valid flag for allowEmptyFor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis Igoumenos committed Sep 21, 2021
1 parent 57063f6 commit b2d1fae
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/src/Model/Table/ApiUsersTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ public function validationDefault(Validator $validator) {
'content',
[ 'rule' => 'isInteger' ]
);
$validator->allowEmptyFor('matchgrid_id', Validator::EMPTY_NULL);
$validator->allowEmpty('matchgrid_id');

$validator->add(
'system_of_record_id',
'content',
[ 'rule' => 'isInteger' ]
);
$validator->allowEmptyFor('system_of_record_id', Validator::EMPTY_NULL);
$validator->allowEmpty('system_of_record_id');

return $validator;
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/Model/Table/AttributesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function validationDefault(Validator $validator) {
'content',
[ 'rule' => 'isInteger' ]
);
$validator->allowEmptyFor('attribute_group_id', Validator::EMPTY_NULL);
$validator->allowEmpty('attribute_group_id');

$validator->add(
'alphanumeric',
Expand Down Expand Up @@ -202,7 +202,7 @@ public function validationDefault(Validator $validator) {
'content',
[ 'rule' => 'isInteger' ]
);
$validator->allowEmptyFor('attribute_map_id', Validator::EMPTY_NULL);
$validator->allowEmpty('attribute_map_id');

return $validator;
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/Model/Table/MatchgridSettingsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function validationDefault(Validator $validator) {
'content',
[ 'rule' => [ 'range', 1, null ] ]
);
$validator->allowEmptyFor('referenceid_start', Validator::EMPTY_NULL);
$validator->allowEmpty('referenceid_start');

$validator->add(
'referenceid_prefix',
Expand Down
2 changes: 1 addition & 1 deletion app/src/Model/Table/PermissionsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function validationDefault(Validator $validator) {
'content',
[ 'rule' => 'isInteger' ]
);
$validator->allowEmptyFor('matchgrid_id', Validator::EMPTY_NULL);
$validator->allowEmpty('matchgrid_id');

$validator->add(
'permission',
Expand Down
6 changes: 3 additions & 3 deletions app/src/Model/Table/RuleAttributesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function validationDefault(Validator $validator) {
'content',
[ 'rule' => 'isInteger' ]
);
$validator->allowEmptyFor('crosscheck_attribute_id', Validator::EMPTY_NULL);
$validator->allowEmpty('crosscheck_attribute_id');

$validator->add(
'search_type',
Expand All @@ -132,14 +132,14 @@ public function validationDefault(Validator $validator) {
'toggle',
[ 'rule' => [ 'boolean' ] ]
);
$validator->allowEmptyFor('required', Validator::EMPTY_NULL);
$validator->allowEmpty('required');

$validator->add(
'match_empty',
'toggle',
[ 'rule' => [ 'boolean' ] ]
);
$validator->allowEmptyFor('match_empty', Validator::EMPTY_NULL);
$validator->allowEmpty('match_empty');

return $validator;
}
Expand Down

0 comments on commit b2d1fae

Please sign in to comment.