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

Examples for nested/complex property? #31

Open
GF-Huang opened this issue Mar 26, 2021 · 0 comments
Open

Examples for nested/complex property? #31

GF-Huang opened this issue Mar 26, 2021 · 0 comments

Comments

@GF-Huang
Copy link

public class ComplexModel {
    public int Number { get; set; }
    public string Name { get; set; }
    public bool IsOK { get; set; }
}

public class ViewModel : ValidatableViewModelBase {
    public ComplexModel Model { get; set; }

    public ViewModel() {
        Validator.AddRule(...) // how to validate Model.Number == 1 && Model.Name == "xxx" && Model.IsOK ?
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant