A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Dac Thach Nguyen
Feb 20, 2019
  5215
(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
Event Mechanism on Contact Creation in Optimizely Commerce 14

In Optimizely Commerce 14, there is no traditional event or callback exposed for customer contact creation or updates. Instead, contact lifecycle...

Francisco Quintanilla | Jan 7, 2026 |

A day in the life of an Optimizely OMVP - Introducing Webhook Management in OptiGraphExtensions v4 for Optimizely CMS 12

The OptiGraphExtensions add-on has just received a significant update that many in the Optimizely community have been waiting for: comprehensive...

Graham Carr | Jan 7, 2026

Climbing the Relevancy Ladder: Unlocking Vertex AI Search Tiers in Commerce Search v3

Author: Naveen Samala, Staff Software Engineering at Optimizely What If Your Search Could Predict What Each Customer Will Buy? Imagine a search...

Patrick Lam | Jan 6, 2026

Introducing MicroMediator: A Lightweight High-Performance Mediator for .NET

A lightweight, high-performance mediator pattern library for .NET. Learn why MicroMediator exists, how it compares, and how it fits cleanly into ma...

Andy Blyth | Jan 5, 2026 |