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

UI/Fix form validation issues #15560

Merged
merged 18 commits into from
May 25, 2022
Merged

Conversation

hellobontempo
Copy link
Contributor

@hellobontempo hellobontempo commented May 20, 2022

Fixes form validations ignoring the defaultValue and disabling the form even though 0 is valid.
Screen Shot 2022-05-20 at 5 07 44 PM

After fix:
validations

@hellobontempo hellobontempo added ui bug Used to indicate a potential bug labels May 20, 2022
@hellobontempo hellobontempo changed the title UI/Fix validation issues, regression from Ember upgrade UI/Fix form validation issues May 21, 2022
Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one thing! Good job tracking this down

ui/lib/core/addon/components/form-field.hbs Outdated Show resolved Hide resolved
ui/tests/unit/utils/validators-test.js Show resolved Hide resolved
@hellobontempo hellobontempo requested a review from hashishaw May 23, 2022 23:04
Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Just one small change and it's good to go (assuming design approval)

ui/app/components/mount-backend-form.js Outdated Show resolved Hide resolved
ui/app/templates/components/mount-backend-form.hbs Outdated Show resolved Hide resolved
Copy link
Contributor

@zofskeez zofskeez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! It might be nice to add a model-validations test for the new invalidFormMessage property.

ui/app/decorators/model-validations.js Outdated Show resolved Hide resolved
ui/app/decorators/model-validations.js Show resolved Hide resolved
ui/app/decorators/model-validations.js Outdated Show resolved Hide resolved
ui/app/models/secret-v2.js Show resolved Hide resolved
ui/lib/core/addon/components/alert-inline.js Outdated Show resolved Hide resolved
ui/lib/core/addon/templates/components/alert-inline.hbs Outdated Show resolved Hide resolved
@hellobontempo hellobontempo added this to the 1.11.0-rc1 milestone May 25, 2022
@hellobontempo hellobontempo merged commit 9fd8a97 into main May 25, 2022
@hellobontempo hellobontempo deleted the ui/fix-validation-form-errors branch May 25, 2022 18:22
Gabrielopesantos pushed a commit to Gabrielopesantos/vault that referenced this pull request Jun 6, 2022
* clean up validators

* fix getter overriding user input

* add changelog

* remove asString option

* move invalid check up

* remove asString everywhere

* revert input value defaults

* undo form disabling if validation errors

* address comments

* remove or

* add validation message to form, create pseudo loading icon

* whole alert disappears with refresh

* glimmerize alert-inline

* add tests

* rename variables for consistency

* spread attributes to glimmerized component

* address comments

* add validation test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants