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

fix(forms): Add float number support for min and max validator #42223

Closed

Conversation

iRealNirmal
Copy link
Contributor

Added float number support for min and max validator

Closes #42215

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Currently min and max validators are not supporting float number

Issue Number: #42215

What is the new behavior?

Added float number support for min and max validator

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla google-cla bot added the cla: yes label May 21, 2021
@pullapprove pullapprove bot requested a review from AndrewKushnir May 21, 2021 16:27
@ngbot ngbot bot added this to the Backlog milestone May 21, 2021
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels May 21, 2021
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

@iRealNirmal thanks for the fix 👍

The code looks good, I've just left a comment about extra tests that we'd need to add.

packages/forms/test/validators_spec.ts Show resolved Hide resolved
@iRealNirmal iRealNirmal force-pushed the validate-min-max-float-numbers branch from f2968ba to 362b022 Compare May 22, 2021 07:10
Copy link
Member

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

One small suggestion.

@iRealNirmal iRealNirmal force-pushed the validate-min-max-float-numbers branch from 362b022 to e20c0ce Compare May 22, 2021 14:07
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

@iRealNirmal thanks for adding tests and updating the code 👍

I've just left one final comment and we should be ready for final checks in Google's codebase and adding this PR to the merge queue if everything goes well.

packages/forms/src/directives/validators.ts Outdated Show resolved Hide resolved
Added float number support for minValidator and maxValidator

Closes angular#42215
@iRealNirmal iRealNirmal force-pushed the validate-min-max-float-numbers branch from 55dc160 to 85a21b3 Compare May 25, 2021 05:30
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @iRealNirmal 👍

I've started tests in Goolge's codebase (internal-only link) and will keep this thread updated.

@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels May 25, 2021
@AndrewKushnir
Copy link
Contributor

@iRealNirmal FYI presubmits in Google's codebase went well, I'm adding this PR to the merge queue.

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: presubmit The PR is in need of a google3 presubmit labels May 25, 2021
@zarend zarend closed this in 3d9062d May 25, 2021
zarend pushed a commit that referenced this pull request May 25, 2021
Added float number support for minValidator and maxValidator

Closes #42215

PR Close #42223
@iRealNirmal iRealNirmal deleted the validate-min-max-float-numbers branch May 27, 2021 02:51
umairhm pushed a commit to umairhm/angular that referenced this pull request May 28, 2021
…ar#42223)

Added float number support for minValidator and maxValidator

Closes angular#42215

PR Close angular#42223
iRealNirmal added a commit to iRealNirmal/angular that referenced this pull request Jun 4, 2021
…ar#42223)

Added float number support for minValidator and maxValidator

Closes angular#42215

PR Close angular#42223
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: forms cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MIN and MAX attributes in Angular 12 templated forms not working with decimal values
4 participants