Clarification on validating data on more than one field?

Can anyone shine light on this one, maybe a basic question but just want to know what it is actually doing?

When you validate data on more than one field what is it actually doing?

For example both these fields are in the same table.

Checks two fields to see if the data already exists, but is this actually doing it independently for each field.

‘validate_email’
‘validate_account’

Or is it: ‘validate_email’ OR ‘validate_account’

Or is it" validate_email’ AND ‘validate_account’

Many thanks!

What are these two validation rules validating? I see one is validating some dynamic expression and the other some post variable? What are you trying to achieve?

Hi @Teodor

I knew you were going to look at this literally :rofl: should have know better.

{email} here is just email address posted in a form.

Just ignore both types.

I was just curious to learn the use case for validation of more than one data object.

For arguments what happens when you validate more than one item posted in a form using the one validate option?

Such as:

Email already exists
Name already exists

Hope it makes sense.

As my question does it progress from one to the other what is the relationship between the two and why would you have more than one validation here?

I believe this topic answers your question:

1 Like

Ah perfect. So it’s currently OR and no AND validation is available at the moment.[quote=“mebeingken, post:3, topic:28915”]
validator uses OR…and I agree, we need an AND option.
[/quote]

AND would make it easier than having to use a condition. Is this a feature request on the radar currently?

Yes, unfortunately.

maybe @patrick can check if AND/OR choice can be easily added there.

1 Like