Jsgrid: How to show error messages returned by server beside or under specific field.

Created on 30 Mar 2017  路  5Comments  路  Source: tabalinas/jsgrid

Hi,

Can someone please help me on how we can show the error messages returned by the server under the respective table cell. Please see below image.(The field is required is error returned by the server and i dont want client side validation) . Currently the client side validators show has alerts instead i want server to validate and show errors for respective field.

image

I really appreciate your help.

PS: This plugin is amazing.. Simple and neat.

THanks,

help wanted

All 5 comments

I don't see how this has to do with JsGrid?

Hi Rich ,

Are you saying this is not related to JSGRID? Basically below is what i am trying to achieve on update. "Field is required" that is returned from server has to shown below respective row address field.

image

@git265 this place is to help about the project JSGRID, not else. Try to ask your questions in technical communities like stackoverflow

I am sorry but i am little confused on why this issue is not related to JSGRID. JSGRID by default shows the client side error messages in alert window. Instead i want to show below the field.

@git265, the usual way to change how validate messages outputted is redefining invalidNotify function. But it has all the error messages, so it won't work since you need to know the invalid field.
You can try to define validate of the field as a function(value, item) (see http://js-grid.com/docs/#field-validation-config), which not only validates the value, but also outputs the validation result as desired. You can find the row using method rowByItem of the grid to know where to position your message.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andymacourek picture andymacourek  路  3Comments

julmarci picture julmarci  路  4Comments

samuelrobertson picture samuelrobertson  路  3Comments

flyinmryan picture flyinmryan  路  3Comments

julmot picture julmot  路  3Comments