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:
parent
aa64e2e6e5
commit
4138eda5cb
|
@ -74,3 +74,12 @@ func (input I18nInput) FillArray(array database.RecordArray) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (input I18nInput) Error() string {
|
||||
for _, inner := range input {
|
||||
if inner.Error != nil {
|
||||
return inner.Error.Error()
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue