You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
There is no documentation for the server side validation
Expected/desired behavior:
I would like to suggest the snippet down below for the remote validation example. Meanwhile while implementing it I found some caveats in the current library version that should be tackled somehow.
Custom rule config and message properties are evaluated while creating the custom rule. The only way I found to pass the error result from the server to the validator was to manipulate the source viewmodel itself which is not the most elegant solution. Better would be to have the ability to specify the config or error message as functions while defining the custom rule. Examples:
The standard validator don't implement the reject for the promises. In case of an uncaught exception the field is not validated at all. I believe that if the Promise is rejected, the validation should fail with an "unexpected" error message
The i18n example is outdated. The function is no longer called parseMessage but only parse. You should add also a fallback for the case where the message key doesn't exist. It happens in the case where a custom rule is added.
I'm submitting a feature request
1.1.1
Please tell us about your environment:
Operating System:
Windows 10
Node Version:
6.9.4
NPM Version:
3.10.10
JSPM OR Webpack AND Version
N/A
Browser:
all
Language:
TypeScript 2.2.2
Current behavior:
There is no documentation for the server side validation
Expected/desired behavior:
I would like to suggest the snippet down below for the remote validation example. Meanwhile while implementing it I found some caveats in the current library version that should be tackled somehow.
or using the config object
The standard validator don't implement the reject for the promises. In case of an uncaught exception the field is not validated at all. I believe that if the Promise is rejected, the validation should fail with an "unexpected" error message
The i18n example is outdated. The function is no longer called parseMessage but only parse. You should add also a fallback for the case where the message key doesn't exist. It happens in the case where a custom rule is added.
View Model and Service Result Definition
Service call
Rule definition
Translation file
The text was updated successfully, but these errors were encountered: