How can I create custom unique validation message

Hello team,

I assigned some fields(Surname) as unique

Can I change unique validation message?

Right now when there is duplicate date upon saving it pops default message “Surname must be unique”


That’s only because two separate validations are failing and upon the first failure, Framework stops validating other fields and throws an error.

Once you fix “surname” it will show a correct message for other failing validations.

Hi @ankush

Where can we customize the actual error message that pops-up?
In the case above, let’s say we want to change the error message from “[field-name] must be unique” to “[field-name] already exists, please try with a different value” where can we change this string?

try user translation?

Hi @szufisher

Already tried using translations but doesn’t seem to work. Can you point in the right direction please?

sorry, I have no further guidance, if you already tried and it failed, then maybe change the code is the last option.