How to remove mandatory filed check

Sumita K
Sumita K used Ask the Experts™
on
How to remove mandatory filed check in node js (loopback framework).

I commented below lines from html
<span class="errorForm" ng-show="(profileForm.uOccupation.$dirty || submitted) && (profileForm.uOccupation.$error.required)">
                                                <span class="errorForm" ng-show="profileForm.uOccupation.$error.required">Required</span>
                                            </span>

so now alert is not coming on UI but now page is not submitting.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chief Technology Ninja
Distinguished Expert 2018
Commented:
Hi Sumita,

The code you have posted it just to show the error when the required field data is not entered.

If you wan to get rid of mandatory check then you should check the input control(textbox/textarea, radio etc) as you will see they will have the controlling attributes.
Check for ng-required there and get rid of that attribute.

Regards,
Chinmay.
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
This looks like an AngularJS application.

We would need to see the rest of the code to be able to answer the question.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial