django-angular icon indicating copy to clipboard operation
django-angular copied to clipboard

Issue in Client-Side Form Validation

Open santhosh432 opened this issue 7 years ago • 3 comments

Hello jrief, I have used the client side angular validations with boostarp3 and django1.11, the errors are displaying only if i coded with {{ form.as_div }} in the templates, but when i am using the {{ form.as_table }} the errors are not displaying.Please help me to resolve the issue

Thanks in advance....

santhosh432 avatar Dec 01 '17 09:12 santhosh432

Indeed, it is required to be used with as_div to work as expected.

adrienbrunet avatar Dec 01 '17 10:12 adrienbrunet

ok , is there any other possibilities to show the errors.... like {% for form in subform %} {{ form.as_div }} {% end for %} I stuck with this issue....

santhosh432 avatar Dec 01 '17 10:12 santhosh432

@santhosh432 here Django and Bootstrap have different opinions on how to represent form validation errors. If you can provide an example on how you would render a form using as_table in combination with BS3, that would be a good starting point.

Hint: Use the existing form rendered in the demo, transfer it to Plunker, Bootply, jsFiddle or whatever and change it accordingly.

Then for me it will be much easier to add that to the as_table() renderer.

jrief avatar Dec 01 '17 10:12 jrief