Search packages, repositories and app categories

validation_textformfield cover
Package detailsv2.2.5

validation_textformfield

flutter textfield validation lets you validate different textform fields in your Flutter app.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
41
Likes
37
Pub points
130

Install package

flutter pub add validation_textformfield

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The validation_textformfield package enhances Flutter applications by providing easy-to-use validation for text form fields. It allows developers to apply various validation rules—such as required fields, email format, and custom patterns—directly within TextFormField widgets. With support across all major platforms, it streamlines input validation without requiring boilerplate code. The package integrates seamlessly into existing forms, improving user experience through real-time feedback. It is ideal for apps needing robust, reusable form validation logic.

Use cases

  • Form input validation
  • Email and phone number validation
  • Custom validation rules
  • Real-time user feedback
  • Reusable form components
  • Cross-platform form handling

Key features

  • Built-in validation rules
  • Custom validator support
  • Real-time validation feedback
  • Cross-platform compatibility
  • Simple integration with TextFormField
  • Extensible validation logic

Suitable for

  • Flutter beginners
  • Form-heavy applications
  • Mobile and web apps
  • Developers seeking quick validation
  • Apps requiring consistent input validation
  • Teams prioritizing development speed

Considerations

  • Limited to text form fields
  • No built-in internationalization
  • Requires manual error message customization
  • Depends on external dependencies
  • Not designed for complex nested forms
  • May need additional styling for UI consistency

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Installation

  1. Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
  validation_textformfield: Update version
  1. Import the package and use it in your Flutter App.
import 'package:validation_textformfield/validation_textformfield.dart';
    

A Flutter package for launching a Validation TextFormField . Supports iOS, Android, web, Windows, macOS, and Linux.

Example


EmailValidationTextField(
 whenTextFieldEmpty: "Please enter  email",
 validatorMassage: "Please enter valid email",
 decoration: InputDecoration(
 focusedBorder: OutlineInputBorder(
 borderSide: BorderSide(color: Colors.black, width: 0.5),
),
 enabledBorder: OutlineInputBorder(
 borderSide: BorderSide(color: Colors.black, width: 0.5),
),
 border: OutlineInputBorder(),
 counterText: '',
 hintStyle: TextStyle(color: Colors.black, fontSize: 18.0)),
 textEditingController: txtEmailCtrl,
)
PassWordValidationTextFiled(
 lineIndicator:false,
 passwordMinError: "Must be more than 5 charater", 
 hasPasswordEmpty: "Password is Empty",
 passwordMaxError: "Password to long", 
 passWordUpperCaseError: "at least one Uppercase (Capital)lette",
 passWordDigitsCaseError: "at least one digit",
 passwordLowercaseError: "at least one lowercase character",
 passWordSpecialCharacters: "at least one Special Characters",
 obscureText: _isObscure,
 scrollPadding: EdgeInsets.only(left: 60),
 onChanged: (value) {
  // print(value);
 },
 passTextEditingController: txtPasswordCtrl,
 passwordMaxLength: 10,
 passwordMinLength: 5,
),

ConfirmPassWordValidationTextFromField(
 obscureText: _isObscure,
// obscureText: _isObscure,
 scrollPadding: EdgeInsets.only(left: 60),
 onChanged: (value) {
// print(value);
 },
 whenTextFieldEmpty: "Empty",
 validatorMassage: "Password not Match",
 confirmtextEditingController: txtConfPasswordCtrl,
// passtControllername:txtPasswordCtrl
),

See the example app for more complex examples.

Image

Email

BasicPassword

passwordLiner

Getting Started

For help getting started with Flutter, view our online documentation.

Categories

Source repository

Projects using this package

No data available yet.