text_field_validator

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

text field validator

A flutter package for both Android and iOS which provides the validation functionalities for the input fields.
Features #
Provides validation for the input types
1. text
2. password
3. email
4. phone
5. url
Getting started #
Add the text_field_validator package into pubspec.yaml file start working.
import the package as import 'package:text_field_validator/text_field_validator.dart';
Usage #
import 'package:text_field_validator/text_field_validator.dart';

class ValidatorTest extends StatefulWidget {
const ValidatorTest({Key? key}) : super(key: key);

@override
State<ValidatorTest> createState() => _ValidatorTestState();
}

class _ValidatorTestState extends State<ValidatorTest> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Container(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Center(
child: Column(
children: [
TextFormField(
validator: (value) {
return TextFieldValidator.textValidator(
value: value,
);
},
),
const SizedBox(height: 20),
TextFormField(
validator: (value) {
return TextFieldValidator.passWordValidator(
password: value,
);
},
),
],
),
),
),
);
}
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.