2022-12-05 08:06:45 +00:00
|
|
|
import 'package:form_builder_validators/form_builder_validators.dart';
|
|
|
|
import '../utils/text_container.dart';
|
|
|
|
|
2022-12-12 08:44:26 +00:00
|
|
|
final mobileNumberValidator = FormBuilderValidators.compose([
|
2022-12-20 06:26:37 +00:00
|
|
|
FormBuilderValidators.equalLength(11),
|
2022-12-12 08:44:26 +00:00
|
|
|
FormBuilderValidators.required(errorText: mobileNumberRequired),
|
|
|
|
FormBuilderValidators.numeric(errorText: numericValidator)
|
|
|
|
]);
|
2023-03-16 07:53:42 +00:00
|
|
|
final numericRequired = FormBuilderValidators.compose([
|
|
|
|
FormBuilderValidators.required(errorText: "This field is required"),
|
|
|
|
FormBuilderValidators.numeric(errorText: numericValidator)
|
|
|
|
]);
|
2022-12-05 08:06:45 +00:00
|
|
|
|
2022-12-12 08:44:26 +00:00
|
|
|
final registerPasswordValidator = FormBuilderValidators.compose([
|
|
|
|
FormBuilderValidators.required(errorText: "Password is required"),
|
|
|
|
FormBuilderValidators.minLength(6,
|
|
|
|
errorText: "Password must be equal or greater than 6 characters"),
|
|
|
|
]);
|
2023-03-21 01:37:55 +00:00
|
|
|
|
2023-06-06 06:54:51 +00:00
|
|
|
final integerAndNumeric = FormBuilderValidators.compose([
|
|
|
|
FormBuilderValidators.integer(radix: 10, errorText: "Enter a number"),
|
|
|
|
FormBuilderValidators.numeric(errorText: "Enter a number")
|
|
|
|
]);
|