-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature Add Validation to ReactiveProperty (#3777)
<!-- Please be sure to read the [Contribute](https://github.com/reactiveui/reactiveui#contribute) section of the README --> **What kind of change does this PR introduce?** <!-- Bug fix, feature, docs update, ... --> Feature for #3771 **What is the current behavior?** <!-- You can also link to an open issue here. --> ReactiveProperty has basic functionality **What is the new behavior?** <!-- If this is a feature change --> 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 ```c# 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** - [x] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) **Other information**:
- Loading branch information
1 parent
095a9c9
commit 2e67fcd
Showing
16 changed files
with
1,186 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.