Skip to content

How to validate hidden fields with this plugin #26

@harishnagi007

Description

@harishnagi007

Well, I have a hidden field in my form and trying to validate the ui-select element. On submit it shows the error label, but when the hidden fields gets it value from the ng-model, the error is still shown and also i am not able to submit the form.

Here's the html

<ui-select ng-model="noPostData.locaopt.id" theme="selectize">
   <ui-select-match placeholder="Select Location">{{$select.selected.name}}</ui-select-match>
          <ui-select-choices repeat="obj.id as obj in locaoptions | filter: {name: $select.search}">
                  <div ng-bind-html="obj.name | highlight: $select.search"></div>
            </ui-select-choices>
</ui-select>
<input type="hidden" name="subloc_loca" ng-model="noPostData.locaopt.id">

Here's the options

 $scope.validationOptions={
        ignore: [],
        rules: {
           subloc_loca: {
                required: true
            }
}

If the hidden field is getting its value from ng-model, why the error label is not going away. Why is this happening and how can i achieve this. Please help me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions