validateFullName static method
- String? value,
- BuildContext context
Validates a full name to ensure it contains only letters and spaces. @param value The full name string to validate. @param context The BuildContext for localization. @return A string error message if validation fails, or null if it passes.
Implementation
static String? validateFullName(String? value, BuildContext context) {
if (!RegExp(r'^[a-zA-Z\s]+$').hasMatch(value!)) return AppLocalizations.of(context)!.tInvalidFullName;
return null;
}