nylo-core / nylo

Nylo is the fastest way to build your next Flutter mobile app. Streamline your projects with Nylo's opinionated approach to building Flutter apps. Develop your next idea ⚡️

Home Page:https://nylo.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NyTextField

RoxDevvv opened this issue · comments

am using NyTextField it works well however how could I know if all fields are correct when I press submit button
Thank you

Hi @RoxDevvv,

You can create a function in the Widget and use the validate helper to check the data 👍

// Example
_login() {
    String emailExample = 'anthony@web.com';

    validate(rules: {
      "email address": "email" // validation rule 'email'
    }, data: {
      "email address": emailExample
    }, onSuccess: () {
      print('looks good');
      // do something...
    });
}

Check out the docs to learn more