is there way invalidate form if value="0"
in select tag chosen? reason did have default select option show before user see's anything.
but if user doesn't choose anything, form valid.
<form name="add_task_frm" ng-submit="!add_task_frm.$valid || functiontouse()" novalidate> <input type="text" ng-model="name" required /> <select ng-model="action" required> <option value="0" selected disabled>choose action</option> <option value="description">see description</option> <option value="view">view</option> </select> <button type="submit">submit</button> </form>
i think remove value first option should make invalid if user not select anything. recommend changing implementation use ng-options.
Comments
Post a Comment