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

Validate error

andim27 opened this issue · comments

commented

nylo_framework: ^5.0.2
Example:

  validate(
        rules: {
          "name": "not_empty",
          "email": "email",
          "phone number": "regex:(^[+\(\d+\)]+)"
        },
        data: {
          "name": nameFieldValue,
          "email": emailFieldValue,
          "phone number": phoneFieldValue,
        },
        messages: {
          "Name": "Name failed",
          "Email address": "Email failed",
          "Phone number": "Correct phone number format: +(**)**********"
        },
        onSuccess: () {
        },
        onFailure: (Exception exception) {
          print('Validate error: ${exception.toString()}');
        },
        showAlert: true, 
        alertStyle: ToastNotificationStyleType.DANGER);
  }

Alert doesn't show correct messages.It works only for first field

Working on a fix for this @andim27, thanks for highlighting it

Hi @andim27,

This is fixed in v5.1.0 🚀