This is a migrated thread and some comments may be shown as answers.

Custom Validation Dataform

1 Answer 65 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jit
Top achievements
Rank 1
Jit asked on 24 May 2017, 10:48 AM

Can we have some way of making some custom validation?

Say we do have lot of simple validations to be taken care

  • Compare two fields for passwords
  • Validate amount
  • Validations on many other cases

So having a regular express validation for others and having compare kind validation would help the teams. Sorry if it is there and I have missed to see it :)

 

Thanks

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsonev
Telerik team
answered on 25 May 2017, 05:40 AM
Hello,
Thank you for our interest in UI for NativeScript.

At this time you could use some of the available validator listed in the documentation and unfortunately creating a custom one is not supported.

Regarding some of the mentioned points, about the amount validation, if you would like to set some range for the input you could use RangeValidator. More about it could be found here in the documentation and in this example.


About the validation of two fields, we have already logged a feature request and this functionality will be available for some of the next versions of the plugin.


I also attached links to some other request about specific validators, If you have further suggestions you could comment on some of them.
https://github.com/telerik/nativescript-ui-feedback/issues/176
https://github.com/telerik/nativescript-ui-feedback/issues/173


In the meantime, if you need to make some custom validation you could read the input from the DataForm with the help of editedObject property. You could also review the example here.


Hope this will help.

Regards,
nikolay.tsonev
Telerik by Progress
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Tags
DataForm
Asked by
Jit
Top achievements
Rank 1
Answers by
Nikolay Tsonev
Telerik team
Share this question
or