body_validate 0.0.2 copy "body_validate: ^0.0.2" to clipboard
body_validate: ^0.0.2 copied to clipboard

Simplest form validation library for flutter's form

form_validator #

pub package GitHub GitHub Workflow Status

Features #

TODO: You can easily use this pub and enhance your code quality and less improve your code

  • Zero dependency
  • Extensible
  • Well tested
  • Open source

Getting started #

TODO: List prerequisites and provide or point to information on how to start using the package.

Installation #

Add body_validate as dependency to your flutter project by adding this lines to pubspec.yaml.

dependencies:
  body_validate: "0.0.1"

Then run flutter pub get to install required dependencies.

Usage #

TODO: You check all below operations

  • isEmpty
  • isEmail
  • isMobile
  • isPassWord
  • isUrl
  • isListNotEmpty

NOTE:

  • isEmpty - You need to pass one textfiled into "ForeValidate" class
 ForValidate(operation: CheckFiled.isEmpty,list: [],filed1: "Filed 1",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
  • isEmail - You need to pass email into "ForeValidate" class in filed1
 ForValidate(operation: CheckFiled.isEmail,list: [],filed1: "mistrytrushar88@gmail.com",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
  • isMobile - You need to pass mobile number into "ForeValidate" class in filed1
 ForValidate(operation: CheckFiled.isMobile,list: [],filed1: "9687388107",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
  • isPassWord - You need to pass password in filed1 and confirmpassword in filed2 into "ForeValidate" class
 ForValidate(operation: CheckFiled.isPassWord,list: [],filed1: "trush@123",filed2:"trush@123",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
  • isUrl - You need to pass URL into "ForeValidate" class in filed1
 ForValidate(operation: CheckFiled.isUrl,list: [],filed1: "https://pub.dev/packages/body_validate/versions/0.0.1",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
  • isList - You need to pass List in list section into ForeValidate" class
 ForValidate(operation: CheckFiled.isList,list: ["1", "2"],filed1: "",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
 List<ForValidate> validateBodyList = [
 ForValidate(operation: CheckFiled.isEmpty,list: [],filed1: "Filed 1",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
 ForValidate(operation: CheckFiled.isEmail,list: [],filed1: "mistrytrushar88@gmail.com",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
 ForValidate(operation: CheckFiled.isMobile,list: [],filed1: "9687388107",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
 ForValidate(operation: CheckFiled.isPassWord,list: [],filed1: "trush@123",filed2:"trush@123",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
 ForValidate(operation: CheckFiled.isUrl,list: [],filed1: "https://pub.dev/packages/body_validate/versions/0.0.1",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),         
 ForValidate(operation: CheckFiled.isList,list: ["1", "2"],filed1: "",filed2:"",warningTitle: "Your Title",warningMessage: "Your Warning Message"),
 ];
 final result = await FiledValidate().validateFileds(validateBodyList);
 if(result){
    //Do your task here
 }

Developed by #

TRUSHAR MISTRY GIT: Trushar88

3
likes
130
points
34
downloads

Publisher

unverified uploader

Weekly Downloads

Simplest form validation library for flutter's form

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on body_validate