Custom Validation Dataform

Thread is closed for posting
2 posts, 0 answers
  1. Jit
    Jit avatar
    1 posts
    Member since:
    May 2017

    Posted 24 May 2017 Link to this post

    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 :)



  2. Nikolay Tsonev
    Nikolay Tsonev avatar
    340 posts

    Posted 25 May 2017 Link to this post

    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.

    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.

    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.
Back to Top