Does Not Exists / Exists In Database are switched up!

Hey guys, so I have been trying to deal with this for a while now, but it’s getting quite confusing, or it’s meant to be like that but I don’t really quite get the logic behind it!

if I set my server side validation to “Does Not Exist in Database”, it acts and behaves like if the value actually exist in the database, and if I select “Exists In Database” it behaves like I would check if the value wouldn’t exist.

Is this behavior expected?

image

Yep for some reason it is the opposite to the way your would expect it to be.

1 Like

Oh! Thank goodness I’m not the only one! :smiley: - by any chance of life, do you know if we will ever get this switched up for the next updates maybe? I’ve honestly tried to change my thinking around this, but even using it this way, it’s counter intuitive for me and I can’t seem to follow the logic behind it!

2 Likes

I am sure there is some logic behind it, but yes agree I spent a few hours on this when I first used it to try and figure out why it wasn’t working!

1 Like

Wow! I’m not alone!!!

2 Likes

Is this with a specific server model? I’m not aware that it was switched.

When you select the Does Not Exist In Database it will validate when it isn’t in the database and return an error when it exists. At least that is what it should do. If it is the other way around then it should be fixed.

Pretty sure I get this and I’m on NodeJS

So what is expected if you validate Does Not Exist In Database and the value already exists in the database?

Now I understand your reasoning, Patrick! Message is supposed to be an error message! Only “message” make us think “does exists? Message: the record exists”… hope I made myself clear on this one :slight_smile:

The message is indeed an error, so it is exactly the opposite of what is validated. So when a record must exist in the database it will show the message when it doesn’t exist.

1 Like

The general thinking on this is that if you check the box you expect it to check to see if the record “does not exist” and if it does not exist it validates as True to the statement: " = it indeed does not exist in this database.

In context (I even confused myself trying to explain this. :flushed:)

Example of how we read this:

User bob@example.com “does not exist in the database” (check the box)

Answer: bob@example.com does exists in the database. (Correct Statement - No a record does not exists - validates True)

Alternatively:

Answer: 'bob@example.com does indeed exist on the database. (Incorrect Statement - Yes a record exists - Validates False)

But from what you are saying it is actually:

Question: User bob@example.com, “does not exist in the database”? (check the box)

Answer: ''bob@example, “does not exist in the database” (Incorrect Statement - No record exists - validates False)

Alternatively:

Answer: 'bob@example.com, “does not exist in the database” (Correct Statement - Yes a record exists - Validates True)

The checkbox in this example on the “does not exist in the database” makes the statement an oxymoron (contradiction) and is most likley why many of us struggle with the logic and are confused with the check box True/ False.

1 Like

Perhaps better naming is Must (not) Exist in Database and Error Message instead of Message.

1 Like

I prefer change only message to error message :slight_smile:

Not sure, if this actually makes it clear - It still creates the same confusion.

Perhaps all it requires (rather than a name change) is one of those little information " i " rollovers: “checking this box means…” etc…

Once we logically understand that it works the opposite to what you think it is fine, but new users like I was and others will battle with it for hours and some even log a bug report - which I almost did :flushed:

2 Likes