Add Error method to I18nInput

Otherwise, we can not show the error message to the user, although it
assumes only the default language has error message, which is the case
for now, but….
This commit is contained in:
jordi fita mas 2024-01-22 20:15:26 +01:00
parent aa64e2e6e5
commit 4138eda5cb
1 changed files with 9 additions and 0 deletions

View File

@ -74,3 +74,12 @@ func (input I18nInput) FillArray(array database.RecordArray) error {
} }
return nil return nil
} }
func (input I18nInput) Error() string {
for _, inner := range input {
if inner.Error != nil {
return inner.Error.Error()
}
}
return ""
}