Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Dac Thach Nguyen
Feb 20, 2019
  4490
(8 votes)

Custom validation message for Forms

In Forms 4.23 we have released a feature that allows user can enter a custom validation message for each validator. Let say that you have some forms which used the same some validators (ex: RequiredValidator). When visitor enter something not correct, by default the form will display message stored in xml lang files. And there's no way to custom that message for different elements in different forms. But now it is easily done by editor.

First go to edit the field and enter the message on textbox next to it:

Publish the element, form and go to view mode to see the result:

That is, it's simple, right?

Feb 20, 2019

Comments

Praful Jangid
Praful Jangid Feb 21, 2019 06:33 AM

Nice feature.

Are we going to need something (just like we use @Html.ValidationMessage) to render this message?

Dac Thach Nguyen
Dac Thach Nguyen Feb 27, 2019 06:55 AM

No, the message come along with the validator and display using js. You don't need to modify template to have that feature.

Please login to comment.
Latest blogs
Optimizely CMS Developer Tools for macOS

Running Optimizely CMS on macOS presents unique challenges, as the platform was traditionally primarily designed for Windows environments. However,...

Tomek Juranek | Mar 15, 2025

Removing a Segment from the URL in Optimizely CMS 12 using Partial Routing

Problem Statement In Optimizely CMS 12, dynamically generated pages inherit URL segments from their container pages. However, in certain cases, som...

Adnan Zameer | Mar 14, 2025 |

Optimizely Configured Commerce and Spire CMS - Figuring out Handlers

I recently entered the world of Optimizely Configured Commerce and Spire CMS. Intriguing, interesting and challenging at the same time, especially...

Ritu Madan | Mar 12, 2025

Another console app for calling the Optimizely CMS REST API

Introducing a Spectre.Console.Cli app for exploring an Optimizely SaaS CMS instance and to source code control definitions.

Johan Kronberg | Mar 11, 2025 |