passo_mobile_app/unit2/lib/utils/validators.dart

15 lines
596 B
Dart
Raw Normal View History

import 'package:form_builder_validators/form_builder_validators.dart';
import '../utils/text_container.dart';
final mobileNumberValidator = FormBuilderValidators.compose([
2022-12-20 06:26:37 +00:00
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"),
]);