搜索插件、代码仓与 APP 分类

GitHub 代码仓World-Package/validation_textformfield

验证文本表单字段

Flutter 文本字段验证可让您在 Flutter 应用中验证不同的文本表单字段

验证文本表单字段 项目封面
星标
4
复刻
0
最近推送(UTC)
2022年5月16日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

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.

World-Package GitHub avatar
GitHub 作者

World-Package ↗

语言Dart

此仓库发布的插件

使用的依赖

依赖清单 3 项

  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}
  • flutter_lints开发依赖^1.0.0

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗