Skip to content

Commit

Permalink
up: Enhancement global function validate
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jan 10, 2020
1 parent 1c674c2 commit ca86dc8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/framework/src/Helper/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,15 @@ function server(): Server
* @param string $validatorName
* @param array $fields
* @param array $userValidators
* @param array $unfields
*
* @return array
* @throws ValidatorException
*/
function validate(array $data, string $validatorName, array $fields = [], array $userValidators = []): array
function validate(array $data, string $validatorName, array $fields = [], array $userValidators = [], array $unfields = []): array
{
/* @var Validator $validator */
$validator = BeanFactory::getBean('validator');
return $validator->validate($data, $validatorName, $fields, $userValidators);
return $validator->validate($data, $validatorName, $fields, $userValidators, $unfields);
}
}

0 comments on commit ca86dc8

Please sign in to comment.