Skip to content

Commit b00a211

Browse files
committed
Merge branch 'master' into 3.1-merge
2 parents 0b3104f + 6cfed66 commit b00a211

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

src/Validator.php

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,25 @@ public function setContainer(ContainerInterface $container)
699699
$this->container = $container;
700700
}
701701

702+
/**
703+
* Get the value of a given attribute.
704+
*/
705+
public function getValue(string $attribute)
706+
{
707+
return Arr::get($this->data, $attribute);
708+
}
709+
710+
/**
711+
* Set the value of a given attribute.
712+
*
713+
* @param string $attribute
714+
* @param mixed $value
715+
*/
716+
public function setValue($attribute, $value)
717+
{
718+
Arr::set($this->data, $attribute, $value);
719+
}
720+
702721
/**
703722
* Validate a given attribute against a rule.
704723
*
@@ -968,14 +987,6 @@ protected function getRule(string $attribute, mixed $rules): ?array
968987
return null;
969988
}
970989

971-
/**
972-
* Get the value of a given attribute.
973-
*/
974-
protected function getValue(string $attribute)
975-
{
976-
return Arr::get($this->data, $attribute);
977-
}
978-
979990
/**
980991
* Call a custom validator extension.
981992
*/

0 commit comments

Comments
 (0)