Skip to content

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