Skip to content

Merge errors within same group #8

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LeoZandvliet
Copy link

Note:
This code change is actually almost the same as DrDeath72 wrote on 22 Sep 2014 in PR #5

If not merging the errors (on line 181/182), only the last message within a group is preserved.

For example:

 array('email', 'ext.validators.ConditionalValidator',
		'if' => array(
			array('last_name', 'compare', 'compareValue' => '')
		),
		'then' => array(
			array('email', 'required', 'message' => 'Special email message'),
			array('phone_number', 'required', 'message' => 'Special phone number message'),
		)
	),

Now gives two seperate error messages.
Before this change, only the last message, "Special phone number message" was preserved/shown.

If not merging the errors (on line 181/182), only the last message within a group is preserved.

For example:
```
 array('email', 'ext.validators.ConditionalValidator',
				'if' => array(
					array('last_name', 'compare', 'compareValue' => '')
				),
				'then' => array(
					array('email', 'required', 'message' => 'Special email message'),
					array('phone_number', 'required', 'message' => 'Special phone number message'),
				)
			),
```

Now gives two seperate error messages.
Before this change, only the last message, "Special phone number message" was preserved/shown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant