Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form validation #43

Open
maroun-baydoun opened this issue Jul 22, 2015 · 1 comment
Open

Form validation #43

maroun-baydoun opened this issue Jul 22, 2015 · 1 comment

Comments

@maroun-baydoun
Copy link

Validation errors of the angular-wysiwyg are not showing as part of the errors of the parent form. Is that the expected behavior? How to get the validation errors from angular-wysiwyg ?

@samuel-gay
Copy link

It took a little while, but I've found that if you surround the wysiwyg tag with an ng-form tag you can reference the forms $invalid,

(this assumes that you have added your own validation to ngModelCtrl.$validators)

<div ng-form="exampleForm">
<wysiwyg textarea-name="text" ng-model="data"></wysiwyg>
{{exampleForm.text.$invalid}} this didn't work for me
{{exampleForm.$invalid}} this did work however
</div>

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

No branches or pull requests

2 participants