-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lack example for validation in editable fields #41
Comments
You need to return an object where fields is the same as column.property value. Example with the folowing two columns column:{ the return of server must be of this form { I hope that help you. |
What specific server-side function (e.g. controller/API) that the server should throw this data
{
"name":["bad format : only [A-Za-z]"],
"trace.creationDate":["required"]
}
This is what indicated in the documentation but its too vague.
In the “url” of the Save property, it throws an Http Bad Request, but I need to construct the specific data to send back from the server.
From: Guillaume Albini [mailto:[email protected]]
Sent: Wednesday, October 11, 2017 10:11 PM
To: institut-de-genomique/Ultimate-DataTable <[email protected]>
Cc: bfallar3 <[email protected]>; Author <[email protected]>
Subject: Re: [institut-de-genomique/Ultimate-DataTable] Lack example for validation in editable fields (#41)
You need to return an object where fields is the same as column.property value.
Example with the folowing two columns
column : {
property:"name"
}
column:{
property:"trace.creationDate"
}
the return of server must be of this form
{
"name":["bad format : only [A-Za-z]"],
"trace.creationDate":["required"]
}
I hope that help you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#41 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADEvRpsfNsGfehGEkpoyFha6KItICKo1ks5srMxagaJpZM4P0WsT>.
|
Here is the code snippet for my AngularJs script that performs ‘remote’ save
[cid:[email protected]]
Here is my server-side code
[cid:[email protected]]
Cheers,
Benjie
From: Guillaume Albini [mailto:[email protected]]
Sent: Wednesday, October 11, 2017 10:11 PM
To: institut-de-genomique/Ultimate-DataTable <[email protected]>
Cc: bfallar3 <[email protected]>; Author <[email protected]>
Subject: Re: [institut-de-genomique/Ultimate-DataTable] Lack example for validation in editable fields (#41)
You need to return an object where fields is the same as column.property value.
Example with the folowing two columns
column : {
property:"name"
}
column:{
property:"trace.creationDate"
}
the return of server must be of this form
{
"name":["bad format : only [A-Za-z]"],
"trace.creationDate":["required"]
}
I hope that help you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#41 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADEvRpsfNsGfehGEkpoyFha6KItICKo1ks5srMxagaJpZM4P0WsT>.
|
I don't see your code snippet. no images attach. The save must be execute by UDT. UDT used the save.url configuration to call your server. Then your server api need to return a HttpResponse with code different than 200 with a JSON object in the body response. The json object must be match the rules describe in the first comment. Guillaume |
Great thanks!
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Guillaume Albini <[email protected]>
Sent: Wednesday, October 11, 2017 11:20:39 PM
To: institut-de-genomique/Ultimate-DataTable
Cc: bfallar3; Author
Subject: Re: [institut-de-genomique/Ultimate-DataTable] Lack example for validation in editable fields (#41)
I don't see your code snippet. no images attach.
Your server api need to return a HttpResponse with code different than 200 with a JSON object in the body response. The json object must be match the rules describe in the first comment.
Guillaume
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#41 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADEvRqgqofRUCc2MFMke2WU-7maD1Ol7ks5srNzHgaJpZM4P0WsT>.
|
Can you provide a sample on how to display and response an error to the dataTable when it fails validation?
The text was updated successfully, but these errors were encountered: