1

I am having two Kendo checkboxes and I want to validate it as checking atleast one of them is required.

 <h4>Choose your favorite dance form</h4>
    <div class="form-group">

        <div class="col-md-6">
            @(Html.Kendo().CheckBoxFor(e => e.Salsa)
    .Name("Salsa")
    .Label("Salsa"))
            <br />
            @(Html.Kendo().CheckBoxFor(e => e.Latin)
    .Name("Latin")
    .Label("Latin"))
        </div>
    </div>

Below is how my properties are defined in my Model:

        public bool Salsa { get; set; }

        public bool Latin { get; set; }

How can I data annotate them, so that atleast one is required validation takes place.

Thanks!

1
  • @nurdyguy - can u help on this Commented Apr 28, 2016 at 22:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.