πŸ‡ΊπŸ‡ΈUnited States @abenguyen

Account created on 20 February 2018, over 6 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States abenguyen

The snippet from Jacob (#5) worked for me on a somewhat related issue.

Issue: Whenever the number of characters is above maximum and gets validated on the server, it returns a status error message mentioning the error that says:

1 error has been found: FieldNameExample

However, my specific issue is that whenever there are more characters than the maximum, and then an Ajax call is performed (e.g. by pressing "Add More" on a composite field, or uploading a File to a file field), the status error message appears inside the fieldset that the Ajax call was performed from.

In addition, another issue is that the href anchor link appends a hash because it was returned via Ajax; therefore, it was not link to any valid id on the form.

example:
<a href="#edit-fieldnameexample--IuVrFwiiXZg">FieldNameExample</a>

Ultimately, the code snippet in #5 worked for me because now newlines/breaklines are counted; and therefore, does not surpass the maximum amount. As a result, there is no server side error returned. It doesn't solve the root of the problem, which I'm not sure what approach would be the solution (writing custom hook, somehow not validating that element via #validated?).

πŸ‡ΊπŸ‡ΈUnited States abenguyen

reuploaded correct patch

Production build 0.71.5 2024