Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

New Post: Dynamic Form Fields

$
0
0
I have a client requirement to build a dynamic form. I am building the form using a list of the following:
    public class FieldViewModel
    {
        public string FieldName { get; set; }
        public string FieldValue { get; set; }
        public bool IsDate { get; set; }
        public int? MaxLength { get; set; }
    }
What I want to do is define a validator such that FieldViewModel.FieldValue is validated against FieldViewModel.MaxLength and FieldViewModel.IsDate

Is this possible with FluentValidation?

Viewing all articles
Browse latest Browse all 1917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>