Click here to Skip to main content
15,900,378 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
in bootstrap Form as follow :
<div class="form-group row">
                                      <label class="col-sm-2">
                                          sem
                                      </label>
                                      <div class="col-sm-3">
                                          <select id="edRole" class="selectpicker form-control" data-live-search="true" data-token="true" runat="server" required="True"  />
                                          <label id="lblRole" runat="server" />
                                      </div>
                                      <label class="col-sm-2">
                                         Sprot
                                      </label>
                                      <div class="col-sm-3">
                                          <select id="edField" class="selectpicker form-control" data-live-search="true" data-token="true"  runat="server" />
                                          <label id="lblField" runat="server" />
                                      </div>
                                  </div>


i Want to find control with required tag :

function RequiredValidation(prefix) {
    var valid = true;
    var Selector = '[required]';
    if (prefix) Selector = prefix + " " + Selector;
    $.each($(Selector), function () {
        if ($(this).val() == "") {
            valid = false;
             $(this).css("box-shadow", "0 0 5px red !important");
        }
        else
            $(this).css("box-shadow", "");
    });
    if (!valid) {
        show('*' + ' required', prefix);
        return false;
    }
    else return true;
}


What I have tried:

when i change required tag to True but don't find any control
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900