Skip to content
This repository has been archived by the owner on Aug 15, 2021. It is now read-only.

Can't validate on multiple tabs #146

Open
bhavesh-vyas opened this issue Jun 13, 2016 · 3 comments
Open

Can't validate on multiple tabs #146

bhavesh-vyas opened this issue Jun 13, 2016 · 3 comments

Comments

@bhavesh-vyas
Copy link

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

@jonsamwell
Copy link
Owner

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

validationManager.validateForm(formElement)

@jonsamwell
Copy link
Owner

You would have to do something like the ngSubmit decorator

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

@bhavesh-vyas
Copy link
Author

bhavesh-vyas commented Jun 14, 2016

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>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants