show string errors
This commit is contained in:
parent
66bdf442d6
commit
c29b53cdd6
|
@ -12,7 +12,9 @@ export class ValidationService {
|
||||||
const defaultErrorMessage = this.i18nService.t('unexpectedError');
|
const defaultErrorMessage = this.i18nService.t('unexpectedError');
|
||||||
const errors: string[] = [];
|
const errors: string[] = [];
|
||||||
|
|
||||||
if (data == null || typeof data !== 'object') {
|
if (data != null && typeof data === 'string') {
|
||||||
|
errors.push(data);
|
||||||
|
} else if (data == null || typeof data !== 'object') {
|
||||||
errors.push(defaultErrorMessage);
|
errors.push(defaultErrorMessage);
|
||||||
} else if (data.validationErrors == null) {
|
} else if (data.validationErrors == null) {
|
||||||
errors.push(data.message ? data.message : defaultErrorMessage);
|
errors.push(data.message ? data.message : defaultErrorMessage);
|
||||||
|
|
Loading…
Reference in New Issue