Hi,
yeah, the validation-message is a problem. I couldn't find any way of setting
it externally.
The "default" message is too general to be helpful for editors. Especially when
the validation involves things like a 25 character limit, the message should
really point out what is wrong ("Your input is too long. Please use a maximum
of 25 characters.").
We use the field description to inform the user about the expected format, but
people still make mistakes, and are then confused by the generic validation
message.
I implemented a "quick and dirty" solution by subclassing the edit control and
overriding the setValidationMessage() method to substitute my own message.
This is particularly important when setting validationPattern on a ckEditor
field. Since the (invalid) field contents are echoed in the message, and
ckEditor fields typically have long content (and in HTML), the standard
validationMessage does not fit in the javascript dialog, and is completely
incomprehensible to the end user.
I think I will open a bug for this in JIRA...
Regards from Vienna,
Richard
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]]
Im Auftrag von Magnolia Forums (on behalf of Antti Hietala)
Gesendet: Donnerstag, 10. November 2011 09:10
An: Magnolia User List
Betreff: [magnolia-user] Re: Edit Control Type functionality
That is a nifty solution!
Has anyone found an easy way to customize the validation message? Currently a
generic message "The value '1234' is not valid for the field [ZIP code] on the
tab [Address]!" is displayed to the user. While technically accurate, it
doesn't say what the expected format is.
I suppose you could add help text about the expected format in a
labelDescription node.
--Antti
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=be0ac84d-4bbf-44f3-86b9-1f66e0c96e39
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------