@@ -186,23 +186,6 @@ public function run(?array $data = null, ?string $group = null, ?string $dbGroup
186186 return $ this ->getErrors () === [];
187187 }
188188
189- /**
190- * Runs the validation process, returning true or false
191- * determining whether validation was successful or not.
192- *
193- * @TODO the method signature is not good. Should make the checkValue()
194- * method this method.
195- *
196- * @param array|bool|float|int|object|string|null $value
197- * @param string[] $errors
198- */
199- public function check ($ value , string $ rule , array $ errors = []): bool
200- {
201- $ this ->reset ();
202-
203- return $ this ->setRule ('check ' , null , $ rule , $ errors )->run (['check ' => $ value ]);
204- }
205-
206189 /**
207190 * Runs the validation process, returning true or false determining whether
208191 * validation was successful or not.
@@ -212,7 +195,7 @@ public function check($value, string $rule, array $errors = []): bool
212195 * @param string[] $errors
213196 * @param string|null $dbGroup The database group to use.
214197 */
215- private function checkValue ($ value , $ rules , array $ errors = [], $ dbGroup = null ): bool
198+ public function check ($ value , $ rules , array $ errors = [], $ dbGroup = null ): bool
216199 {
217200 $ this ->reset ();
218201
@@ -732,7 +715,7 @@ protected function fillPlaceholders(array $rules, array $data): array
732715
733716 // Validate the placeholder field
734717 $ dbGroup = $ data ['DBGroup ' ] ?? null ;
735- if (! $ validator ->checkValue ($ data [$ field ], $ placeholderRules , [], $ dbGroup )) {
718+ if (! $ validator ->check ($ data [$ field ], $ placeholderRules , [], $ dbGroup )) {
736719 // if fails, do nothing
737720 continue ;
738721 }
0 commit comments