TF-4178 Add create new label modal

This commit is contained in:
dab246
2025-11-26 12:10:55 +07:00
committed by Dat H. Pham
parent f6f299dc97
commit d3029ec4de
16 changed files with 629 additions and 1 deletions
@@ -48,4 +48,18 @@ extension ValicatorFailureExtension on VerifyNameFailure {
return '';
}
}
String getMessageLabelError(AppLocalizations appLocalizations) {
if (exception is EmptyNameException) {
return appLocalizations.this_field_cannot_be_blank;
} else if (exception is DuplicatedNameException) {
return appLocalizations.tagNameAlreadyExists;
} else if (exception is SpecialCharacterException) {
return appLocalizations.tagNameCannotContainSpecialCharacters;
} else if (exception is NameWithSpaceOnlyException) {
return appLocalizations.thisFieldCannotContainOnlySpaces;
} else {
return '';
}
}
}