Reputation: 32758
How I can display custom error messages for required field and other validations in jqGrid forms.
Upvotes: 1
Views: 4356
Reputation: 221997
You can use attr
property of the searchoptions to set additional attributes of the input
or select
element used in the searching toolbar.
UPDATED: In the comment you explained that you means to customize the validation messages. You can ovewride the valuse from $.jgrid.edit.msg
(see grid.locale-en.js
or other localization files). For example you can use
$.jgrid.edit.msg.required = "is missing";
If you want to make the message more dynamic you can use custom
editrule and build the error message inside of custom_func.
Upvotes: 4