Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get valid data #319

Open
iamludal opened this issue Dec 21, 2020 · 0 comments
Open

Get valid data #319

iamludal opened this issue Dec 21, 2020 · 0 comments

Comments

@iamludal
Copy link

Feature request

Currently, $gump->run($data) returns $data, which is redundant, and would return unwanted keys.

As this might be useful though in some cases that I don't know about, I suggest a new method to only get valid data.

Example

$gump->validation_rules(['title' => 'required']);
$gump->run(['title' => 'Sample title', 'content' => 'Sample content']);
$validData = $gump->validData(); // ['title' => 'Sample title']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants