Async validator not showing error message.

I have a validator function with the "async" flag set to true.  It is working however the error message is not showing when the record is saved and the validation fails.

		viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[
			{
				"operation": "merge",
				"path": [
					"attributes"
				],
				"values": {
					"UsrCaptainReportsTo": {
						"modelConfig": {
							"path": "UsrYachtsDS.UsrCaptainReportsTo"
						},
						"validators": {
							"CaptainReportsTo": {
								"type": "usr.CaptainReportsTo",
								"params": {
									"message": "'Captain reports to' must be an affiliate in the yacht's affiliates list."
								}
							}
						}
					},
		validators: /**SCHEMA_VALIDATORS*/{
			"usr.CaptainReportsTo": {
				"validator": function (config) {
					return async function (control) {
						var validated;
						validated = false;
						//debugger;
						return validated ? null : { "usr.CaptainReportsTo": { message: config.message } };
					};
				},
				"params": [
					{
						"name": "message"
					}
				],
				"async": true
			}
		}/**SCHEMA_VALIDATORS*/

 

Like 0

Like

1 comments

Hello,

 

We've reproduced the issue in 8.1.3 and the only possible way to use the validator now is to use it synchronously (using "async": false). Our R&D team has created a task to fix this bug in future application releases and took it in progress. Thank you for reporting this issue to us and helping us in making the app better!

Show all comments