Made clear massages for errors in recipient registration
This commit is contained in:
@@ -101,8 +101,15 @@ class _AdressBookRecipientFormState extends State<AdressBookRecipientForm> {
|
||||
|
||||
//TODO: Change when registration is ready
|
||||
Future<void> _save() async {
|
||||
if (!_formKey.currentState!.validate() || _methods.isEmpty) {
|
||||
notifyUser(context, AppLocalizations.of(context)!.errorSaveRecipient);
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
|
||||
if (!_formKey.currentState!.validate()) {
|
||||
notifyUser(context, l10n.recipientFormValidationError);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_methods.isEmpty) {
|
||||
notifyUser(context, l10n.recipientFormRule);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -114,8 +121,8 @@ class _AdressBookRecipientFormState extends State<AdressBookRecipientForm> {
|
||||
final recipient = await executeActionWithNotification(
|
||||
context: context,
|
||||
action: _doSave,
|
||||
errorMessage: AppLocalizations.of(context)!.errorSaveRecipient,
|
||||
successMessage: AppLocalizations.of(context)!.recipientFormRule,
|
||||
errorMessage: l10n.errorSaveRecipient,
|
||||
successMessage: l10n.recipientSavedSuccessfully,
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user