Try our conversational search powered by Generative AI!

Dac Thach Nguyen
Feb 20, 2019
  4037
(7 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
A day in the life of an Optimizely Developer - Enabling Opti ID within your application

Hello and welcome to another instalment of A Day In The Life Of An Optimizely developer, in this blog post I will provide details on Optimizely's...

Graham Carr | May 9, 2024

How to add a custom property in Optimizely Graph

In the Optimizely CMS content can be synchronized to the Optimizely Graph service for it then to be exposed by the GraphQL API. In some cases, you...

Ynze | May 9, 2024 | Syndicated blog

New Security Improvement released for Optimizely CMS 11

A new security improvement has been released for Optimizely CMS 11. You should update now!

Tomas Hensrud Gulla | May 7, 2024 | Syndicated blog

Azure AI Language – Key Phrase Extraction in Optimizely CMS

In this article, I demonstrate how the key phrase extraction feature, offered by the Azure AI Language service, can be used to generate a list of k...

Anil Patel | May 7, 2024 | Syndicated blog