Jahia Dev Forum > How can I change...

0 (0 Good)
0 (0 Bad)

How can I change the validation error message?

by  mohitbhunwalia »  2013/07/24 13:52


I am apply validation on string field using regex in node type defination. When validation become fails , then a error message pop-ups. But I want to change that message with my custom message. Please help me if there any solution... 


Number of messages  15
Registration date
0 (0 Good)
0 (0 Bad)

Re: How can I change the validation error message?

by  sashok »  2013/08/05 13:17



I came across this problem recently and to be honest, the solution was a little ugly.


Jahia uses a JS validation plugin for form validations - jQuery http://jqueryvalidation.org/

This plugin has the error messages hardcoded inside the java script files. In order to override them, you need to do the following:


You can replace the messages with anything you want. You can also manually add the "localization" folder to your modules and then do something like:

<template:addResources type="javascript" resources="localization/messages_${renderContext.mainResource.locale}.js" />


Hope this helps.


Best Regards,

Alexander KIRILOV


Number of messages  14
Registration date

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page