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

Added 'message' and 'when' params to addNested and addNestedMany #11900

Merged
merged 2 commits into from
Apr 3, 2018

Conversation

jeremyharris
Copy link
Member

I saw this asked for a couple of times in slack. This brings addNested and addNestedMany in line with other validator methods that allow setting custom message and on keys.


$errors = $validator->errors(['user' => ['key' => 'value']]);
$this->assertArrayHasKey('user', $errors);
$this->assertArrayHasKey(Validator::NESTED, $errors['user']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also assert that username key has an error? Or do other tests cover that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markstory markstory self-assigned this Apr 3, 2018
markstory added a commit to cakephp/docs that referenced this pull request Apr 3, 2018
@markstory markstory merged commit f5890bd into cakephp:3.next Apr 3, 2018
@jeremyharris jeremyharris deleted the nested-when branch April 3, 2018 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants