Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Actually I need to show custom error messages so i have to use field validation, but i need same error messages to display with client side validation but i it only shows default messages.
Any idea ?
Comment | File | Size | Author |
---|---|---|---|
#4 | clientside_validation-fix_field_replacement-1974618-4.patch | 876 bytes | -enzo- |
#2 | clientside_validation-fix_field_replacement-1974618-s.patch | 1.6 KB | -enzo- |
#2 | field_validation_definition.png | 20.19 KB | -enzo- |
#2 | clientside_validation_wrong_error_report.png | 8.01 KB | -enzo- |
Comments
Comment #1
attiks CreditAttribution: attiks commentedIt does, you can alter individual messages using the technique outlined in #1896426: "FIELD-NAME is a required field" became "This field is required" upgrading to latest DEV
PS: This isn't critical
Comment #2
-enzo- CreditAttribution: -enzo- commentedHello Ahmed
I guess the error is because you are using the token [bundle] and [entity-type], these tokens are not supported yet in clientside_validation.
The other options is you are experimenting an errore related with wrong error output, let me exemplify .
1. Email rule validation
You can notice I'm using the tokens [value] and [field-name], but when I use in client validation I got a strange error report, check the following image.
I did a small patch to fix that error attached in this post, please check and let me know if works for you
Comment #3
attiks CreditAttribution: attiks commentedThe only supported tokens are [value] and [field-name], see #1804784: Bug with support for Field Validation Tokens, adding support for other tokens means we need a way to pass the info from the php side to the js side
Marking this as a bug for the patch in #2, patch contains some white space errors, can you reroll?
Comment #4
-enzo- CreditAttribution: -enzo- commentedHelll attiks
Check the patch now, and let me know if works for you
Comment #5
Jelle_SFixed in the latest dev version. Thanks for the patch!
Comment #6
-enzo- CreditAttribution: -enzo- commentedJelle
Can you do the commit with my sign ?
Pass the following option to git commit to attribute authorship to this user:
--author="enzo "
To get the contribution reported in my profile, you can get more information about "Adding a commit author" https://drupal.org/node/1146430
Comment #7
Jelle_S@-enzo- : The commit already has you as an author ;-)