Custom error messages for mandatory fields

Hi there,

Apologies if this has already been asked before, but for instances where a user has forgotten to provide an input for a mandatory field, by default Liberty Create generates an error message of ‘This field is required.’

There’s nothing inherently wrong with this, but some organisations such as our own have particular guidelines on content design, and so error messaging needs to be far more specific to each fragment. So, for something like a last name, the error message needs to be something like “Please enter your last name.”

Is there an existing functionality that can do this, or is this something we’ll need to do via a fragment callback? Does this mean we’ll need to create a fragment callback for every specific error message (of which there could be dozens for a single form), or is there a more elegant way of implementing this?

Thanks in advance!

Hi,

At this time it is currently possible to do with a fragment validator but, as you say, per input. I would recommend submitting an idea via our ideas portal https://ideas.netcall.com/i/ideas/p/feature/voting/ideas/list

It would be good to hear the challenge and potential solutions. Create works less contextual this way to support getting a functioning application together quickly, but interpreting the language needed would not be as simple as context matters, e.g. Please submit your/their/a last name depending on the situation and context of the form.

Carl

Thanks Carl, I’ll submit the idea now. (edit: https://ideas.netcall.com/i/ideas/p/feature/vote/idea/view?context_record_id=1909127)

Forgive me if I’ve misunderstood your response, but could a simple solution to this not just be doing something like hint text, where the user has to provide their own custom message? It would essentially leave it to the developer’s discretion, and would hopefully simplify implementation for your engineers.

Because orgs might have different approaches to content design too, implementing a solution that automatically interprets the context, while a cool idea, would actually probably be counter-intuitive to the challenges orgs like ours face with the current design, as it wouldn’t provide us the flexibility/customisation we’re looking for.

Something similar to hint text is definitely a sensible and universal approach which would act as an override to the “default” error message whilst still leaving validator overrides intact.

Thank you for raising, and I am pleased to be your first backer to it.