Skip to content

Commit

Permalink
fix(selectfield): regex comparison
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed May 5, 2021
1 parent b96641b commit b211bd3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inc/field/selectfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ public function equals($value): bool {
return $this->value == $value;
}

public function regex($value): bool {
return preg_match($value, Toolbox::stripslashes_deep($this->value)) ? true : false;
}

public function getHtmlIcon(): string {
return '<i class="fas fa-caret-square-down" aria-hidden="true"></i>';
Expand Down

0 comments on commit b211bd3

Please sign in to comment.