From e05176b4c6130a7248817d2797a5c00ed019d7b4 Mon Sep 17 00:00:00 2001 From: Howie Date: Thu, 23 Apr 2020 01:49:40 -0500 Subject: [PATCH] Adds get errorFields --- app/components/registration-form.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/components/registration-form.js b/app/components/registration-form.js index e195cf1..e22f217 100644 --- a/app/components/registration-form.js +++ b/app/components/registration-form.js @@ -12,6 +12,12 @@ export default class RegistrationFormComponent extends Component { this.formSchema = RegistrationSchema; } + get errorFields() { + if (this.formErrors && this.formErrors.length) { + return this.formErrors.map((error) => error.path); + } + } + @action async handleSubmit(evt) { evt.preventDefault();