angular-auto-validate icon indicating copy to clipboard operation
angular-auto-validate copied to clipboard

Can't validate on multiple tabs

Open bhavesh-vyas opened this issue 9 years ago • 3 comments

Is there any way to validate form fields on non active tabs

bhavesh-vyas avatar Jun 13 '16 08:06 bhavesh-vyas

Yeah I think if you can get the form element you can validate it.

validationManager.validateForm(formElement)

jonsamwell avatar Jun 13 '16 09:06 jonsamwell

You would have to do something like the ngSubmit decorator

https://github.com/jonsamwell/angular-auto-validate/blob/master/src/config/ngSubmitDecorator.js#L25

jonsamwell avatar Jun 13 '16 09:06 jonsamwell

Can you please share any link to working example using above function

Also, do i need different forms for different tabs? Right now I am using single form, and ng-show for the div's (inside the same form) which act as tab, like below

<form ng-submit="submit()">
  <div ng-show="current_tab=='tab_1'">.....</div>
  <div ng-show="current_tab=='tab_2'">.....</div>
  ...
</form>

bhavesh-vyas avatar Jun 14 '16 05:06 bhavesh-vyas