Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kirjs
Copy link
Contributor

@kirjs kirjs commented Oct 10, 2025

This makes the API nicer

@kirjs kirjs requested a review from mmalerba October 10, 2025 14:18
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: forms labels Oct 10, 2025
@ngbot ngbot bot added this to the Backlog milestone Oct 10, 2025
@kirjs kirjs force-pushed the plain-object-from-validators branch 4 times, most recently from 4043e76 to 4219a37 Compare October 10, 2025 20:26
@pullapprove pullapprove bot requested a review from JeanMeche October 10, 2025 20:26
@kirjs kirjs force-pushed the plain-object-from-validators branch 4 times, most recently from c54f6fd to 9820508 Compare October 15, 2025 15:28
@kirjs kirjs requested a review from leonsenft October 15, 2025 20:21
export type FieldValidationResult<E extends ValidationError = ValidationError> =
| ValidationSuccess
| OneOrMany<WithoutField<E>>;
| OneOrMany<E>;
Copy link
Contributor

Choose a reason for hiding this comment

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

With this change, this type becomes equivalent to ValidationResult so there isn't a need for both.

Copy link
Contributor

Choose a reason for hiding this comment

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

In fact, it also makes TreeValidationResult irrelevant since that optionally supports fields, which the error type now does as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I undid this change, now they are different things

Copy link
Contributor

Choose a reason for hiding this comment

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

as @leonsenft mentioned, can we just remove these now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I droppped FieldValidationResult, TreeValidationResult is different though?

@pullapprove pullapprove bot requested a review from atscott October 21, 2025 22:15
@kirjs kirjs force-pushed the plain-object-from-validators branch 2 times, most recently from 676a5d6 to c9394d3 Compare October 23, 2025 19:42
@kirjs kirjs requested review from leonsenft and mmalerba October 23, 2025 19:54
@kirjs kirjs force-pushed the plain-object-from-validators branch from 9dcbeee to 0d71d4c Compare October 23, 2025 20:08
export type FieldValidationResult<E extends ValidationError = ValidationError> =
| ValidationSuccess
| OneOrMany<WithoutField<E>>;
| OneOrMany<E>;
Copy link
Contributor

Choose a reason for hiding this comment

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

as @leonsenft mentioned, can we just remove these now?

@kirjs kirjs force-pushed the plain-object-from-validators branch 3 times, most recently from edbc533 to a3be21f Compare October 23, 2025 21:33
@kirjs kirjs force-pushed the plain-object-from-validators branch 2 times, most recently from b2f27cb to 3976ab3 Compare October 27, 2025 19:05
@kirjs kirjs requested a review from leonsenft October 27, 2025 19:38
@kirjs kirjs requested a review from mmalerba October 27, 2025 19:38
@kirjs kirjs force-pushed the plain-object-from-validators branch from 3976ab3 to a1d99ba Compare October 28, 2025 14:06
@kirjs kirjs force-pushed the plain-object-from-validators branch from a1d99ba to 7c62043 Compare October 28, 2025 15:49
@kirjs kirjs added action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate labels Oct 28, 2025
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

@crisbeto crisbeto merged commit c57bbaa into angular:main Oct 28, 2025
21 of 22 checks passed
@crisbeto
Copy link
Member

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: forms detected: feature PR contains a feature commit target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants