Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form errors not getting populated/being emptied #5

Open
andregoldstein opened this issue Aug 21, 2022 · 2 comments
Open

Form errors not getting populated/being emptied #5

andregoldstein opened this issue Aug 21, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@andregoldstein
Copy link

I'm struggling to get the form helper's error to show up.

When outputting JSON.stringify form.errors I'm getting an empty errors object but if I console.log my form instance after submitting a form with errors, they do show up correctly inside the log

...
form = new Form { name: "", email: "" }

def submit
  form.post "/clients"
  console.log form.errors # { email: .....}

<self>
  ....
  <pre> JSON.stringify form.errors # {}
@haikyuu
Copy link
Owner

haikyuu commented Aug 30, 2022

@andregoldstein try calling imba.commit after the post request. The library should do be doing that though.

@haikyuu haikyuu added the enhancement New feature or request label Aug 30, 2022
@haikyuu haikyuu self-assigned this Aug 30, 2022
@andregoldstein
Copy link
Author

Wonder if this is tied to #4 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants