form_easy_validator 0.8.0 form_easy_validator: ^0.8.0 copied to clipboard
FormEasyValidator is a powerful and customizable Flutter package designed to simplify form validation in your Flutter apps while supporting seamless localization for international users. With FormEasy [...]
This package provides easy form validation for common fields in Flutter applications, such as email and phone numbers. It allows users to customize validation rules and error messages, and supports multiple locales for error messages.
Features #
- Easy form validation for common fields (email, phone, etc.).
- Customizable validation rules and error messages.
- Support for multiple locales for error messages.
Getting started #
In the dependencies:
section of your pubspec.yaml
, add the following line:
dependencies:
form_easy_validator: ^
Usage #
import 'package:flutter/material.dart';
import 'package:form_easy_validator/form_easy_validator.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: FormEasyValidator(
padding: EdgeInsets.all(16),
text: 'Email', // Add the text for the label
validator: (value) => FormEasyValidator().validateEmail(value),
appLocale: Locale('en', 'US'),
textCapitalization: TextCapitalization.none,
),
),
);
}
}
Additional information #
For more information about this package and how to use it, you can refer to the documentation.
Contribution #
We welcome contributions to this package! If you find any issues or have suggestions for improvements, please feel free to file an issue or submit a pull request on https://github.com/JesutoniAderibigbe/form_easy_validator.
License #
This project is licensed under the MIT License - see the LICENSE file for details.