Skip to content

Commit

Permalink
Merge pull request #80 from bim-g/bim-g-patch-1
Browse files Browse the repository at this point in the history
[FIX] match validation bugs
  • Loading branch information
bim-g authored Aug 21, 2023
2 parents 72b847c + 74339a0 commit fb248dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validator/StringValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function url()
public function match(string $key_to_match)
{
$this->isStringAndValid($key_to_match);
if (isset($this->data_source[$key_to_match]) && (strlen($this->field_value) != strlen($this->data_source[$key_to_match])) && ($this->field_value != $this->data_source[$key_to_match])) {
if (isset($this->data_source[$key_to_match]) && ($this->field_value != $this->data_source[$key_to_match])) {
$this->messageItem
->type('string.match')
->message("`$this->field_name` should match `$key_to_match`")
Expand Down

0 comments on commit fb248dd

Please sign in to comment.