passo_mobile_app/lib/utils/validators.dart

15 lines
596 B
Dart

import 'package:form_builder_validators/form_builder_validators.dart';
import '../utils/text_container.dart';
final mobileNumberValidator = FormBuilderValidators.compose([
FormBuilderValidators.equalLength(11),
FormBuilderValidators.required(errorText: mobileNumberRequired),
FormBuilderValidators.numeric(errorText: numericValidator)
]);
final registerPasswordValidator = FormBuilderValidators.compose([
FormBuilderValidators.required(errorText: "Password is required"),
FormBuilderValidators.minLength(6,
errorText: "Password must be equal or greater than 6 characters"),
]);