Nativescript-ui-feedback: DataForm JSON validation

Created on 1 Jun 2017  路  6Comments  路  Source: ProgressNS/nativescript-ui-feedback

Hi,

I'm having issues enabling validation for the form defined in JSON, is it possible to add validation rules in json? In html template (angular) work fine as there are tags added, but can't get it to work in json, all examples point to editors defined in html.

TNS 3 + Angular

thanks

dataform feature

Most helpful comment

@davorpeic I would like to reopen this issue as it is a feature that we will discuss internally when we can implement it.

All 6 comments

Hi @davorpeic,

Defining what validators to be used through JSON is not supported. You will need to use the html as the examples show.

Thank you for the suggestion. We will consider it for our future releases.

Ok, no problem, just wanted to be sure I'm not doing something wrong.

thanks

@davorpeic I would like to reopen this issue as it is a feature that we will discuss internally when we can implement it.

Any idea why conditional on validation tag would not work? I'm trying to do a workaround to show validation only if there is one from my json, but it looks like *ngIf is not working.. this is how I try to use it

<TKMinimumLengthValidator *ngIf="{{item.minLength}}" tkEntityPropertyValidators errorMessage="{{item.minLengthMessage}}" length="{{item.length}}"></TKMinimumLengthValidator>

without *ngIf validation works

thanks

Hello @davorpeic ,

Some update about this feature - now it's available in the latest release v 3.1.0. Read more here.

@Natalia-Hristova OMG Natalia, this looks awesome, will check it soon!

Was this page helpful?
0 / 5 - 0 ratings