Closed reekrd closed 1 year ago
Related to #710. I may close one of the two tickets.
Sure, close this one. Perhaps add to #710 that it also regards basic fields and not only ACF qTranslate Fields.
Indeed it might be different concerns between ACF standard fields and qTranslate
extended fields.
I think I found a solution, merged in master. The validation will check the multilingual values for all standard fields that are enabled, potentially text/textarea/wysiwyg. Let me know how this works.
Released in 3.14.0.
Validation of character limit for basic text fields fails because the string contains language information.
Create a new Basic Text field using ACF. Under validation set Character Limit to 10.
Now if you try to save this field with the value 'qwerty' you will see 'Value must not exceed 10 characters'
The function
validate_value
inclass-acf-field-text.php
sees the value [:en]qwerty[:] which is longer than 10 characters.I did not now that language information was saved in basic text fields. Is this a somewhat new approach?
On our production server we have five languages enabled.
If I update a page or post where we use Basic Text fields they now contain all languages.
Basic text field value before updating the post: the text Basic text field value after updating the post: [:en]the text[:nl]the text[:de]the text[:es]the text[:fr]the text[:]
Validation needs to be done per language but
validate_value
does it on the entire stringPS we have been running qTranslate for years in this project before we migrated to qTranslate-XT