Skip to content

Commit

Permalink
callback for costume validation and parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
SonyPradana committed Sep 7, 2023
1 parent db22986 commit db02596
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/Rule/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ public function end_if(): self
/**
* Adding costume Fillter.
*
* @param callable(): string $costume_filter Callable return as string,
* can contain param as ($value. $param)
* @template T
*
* @param callable(T, array<string, string>): T $costume_filter Callable return as string,
* can contain param as ($value, $params)
*
* @return self
*/
Expand Down
5 changes: 2 additions & 3 deletions src/Rule/Valid.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,8 @@ public function end_if(): self
/**
* Adding costume validation.
*
* @param callable(): bool $costume_validation Callable return as boolean,
* can contain param as ($field, $input, $param, $value)
* @param string $message Add costume message for validate
* @param callable(string, array<string, string>, array<string, string>, mixed): bool $costume_validation Callable return as boolean, can contain param as ($field, $input, $param, $value)
* @param string $message Add costume message for validate
*
* @return self
*/
Expand Down

0 comments on commit db02596

Please sign in to comment.