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

feat(forms) html forms participartion #21872

Closed
wants to merge 2 commits into from

Conversation

bitflower
Copy link
Contributor

@bitflower bitflower commented Aug 4, 2020

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

<ion-input /> does not support native forms participation via ValidityState. This PR introduces an approach to support it. Could be made more generic of course. Just want to start the discussion with @adamdbradley about the possibilities and plans of Ionic.

Of course there is more to cover but that would need a bit of more concepting:

Issue Number: N/A

What is the new behavior?

  • ion-input offers a validity @Prop() which can be consumed by form related logic
  • ion-input offers a @Method() setCustomValidity() to set custom error messages

Does this introduce a breaking change?

  • Yes
  • No

@ionitron-bot ionitron-bot bot added package: angular @ionic/angular package package: core @ionic/core package labels Aug 4, 2020
@amandaejohnston
Copy link
Contributor

Thank you for the PR! We greatly appreciate your work and efforts to get discussion rolling around this change. However, we require all PRs to have a linked issue and/or reproduction of the problem being solved. This is to ensure that the work being done covers all aspects of your particular use case. The APIs being mirrored in this PR are already accessible through the getInputElement method (https://ionicframework.com/docs/api/input#getinputelement), so we would need a specific use case to demonstrate why that method is insufficient.

I'm going to close this PR for now. I know this may not be the resolution you were hoping for after so much time, but we are definitely interested in improving our form integration functionality if this is still a problem you're running into on the latest version of Ionic. I would encourage you to open a Github issue with a minimal reproduction app, and we can go from there. (Note that feature requests have an internal design process that will need to be completed before the PR is merged.)

Thank you for using Ionic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants