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

Feature Add Validation to ReactiveProperty #3777

Merged
merged 5 commits into from Mar 25, 2024
Merged

Conversation

ChrisPulman
Copy link
Member

What kind of change does this PR introduce?

Feature for #3771

What is the current behavior?

ReactiveProperty has basic functionality

What is the new behavior?

ReactiveProperty now supports Validation through INotifyDataErrorInfo
AddValidation and AddValidationError methods added to attach the ReactiveProperty to the Validation mechanism
CheckValidation and Refresh exist to re-evaluate the Validation

MyReactiveProperty = new ReactiveProperty<string>()
    .AddValidation(() => MyReactiveProperty)
    .AddValidationError(s => string.IsNullOrWhiteSpace(s) ? "required" : null);

What might this PR break?

None expected.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

@ChrisPulman ChrisPulman enabled auto-merge (squash) March 25, 2024 08:52
@ChrisPulman ChrisPulman merged commit 2e67fcd into main Mar 25, 2024
1 check passed
@ChrisPulman ChrisPulman deleted the UpdateReactiveProperty branch March 25, 2024 09:12
Copy link

github-actions bot commented Apr 9, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants