unique_entry_values not able to update #4816
Answered
by
jasonvarga
mundgold
asked this question in
Troubleshooting
-
PHP Version | 7.4.25 I have a "reihen_id-field" in my collection - the entered value has to be unique. My Validation Rule: unique_entry_value:series,reihen_id
If I create a new Entry everything works like expected. But if I update an entry I get an error-message "This value has already been taken." Thanks for any hints! |
Beta Was this translation helpful? Give feedback.
Answered by
jasonvarga
Nov 24, 2021
Replies: 1 comment 3 replies
-
You shouldn't replace the parameters. You should leave them with the literal braces, like this: validate:
- 'unique_entry_value:{collection},{id},{site}' Statamic will replace them for you. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
mundgold
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You shouldn't replace the parameters. You should leave them with the literal braces, like this:
Statamic will replace them for you.