Linked Questions
11 questions linked to/from How can I conditionally require form inputs with AngularJS?
4
votes
5
answers
10k
views
Angularjs Validation: Require at least one input from a list
I'm trying to use Angularjs validation to enable a button when at least one input from a list is filled in. What I'm working on is similar to the following w3schools example:
<head>
<...
8
votes
5
answers
5k
views
Compiling dynamic content - AngularJS
I'm rewording this question as I think the original wasn't too clear.
Basically, I have a 'wrapper' directive where I am attempting to dynamically add attributes to one of the wrapped (transcluded) ...
4
votes
3
answers
7k
views
AngularJS: How to set validity based on custom boolean value
I would like to set the validity of a form element based on a custom boolean value. Consider the following password fields:
<input type="password" name="password" ng-model="user.password" required&...
2
votes
1
answer
3k
views
Angularjs: Text field is only required of radio button is ticked.
I have a radio button and a text field. I want the text field to be required only if the radio button is ticked.
<label class="radio">
<input type="radio" value="createNewCollection" ng-...
0
votes
2
answers
2k
views
AngularJS form validation - at least one input with value - add class
I have a form where at least one input must contain data, so I'm using the following to disable the submit until at least one input has data:
<form novalidate>
<input type="text" ng-model="...
0
votes
2
answers
2k
views
AngularJS force input type=file to be valid when editing model
I'm trying to put together a CRUD setup for a domain entity that includes a file. On the front end I have an input of type=file, like so:
<input type="file" name="file" ng-model="template.file" ...
2
votes
2
answers
118
views
How to conditionally apply attribute in angularJS directive?
In html:
<cms-text required="false" id="product_name" thename="product_name"></cms-text>
In cmsText.js
angular.module('cmsText',[]).directive('cmsText', function(){
'use strict';
...
0
votes
1
answer
334
views
Make field required based on another value (state required if country is USA)
I want to have simple form validation on the STATES dropdown if and only if the country value is equal to USA or CANADA.
My validation works so far but its not dependent on the selection of USA or ...
1
vote
1
answer
280
views
Make a field mandatory on the basis of <select> options
I have this select options in my controller:
$scope.statusIds = [{
"id_stato": 18,
"nome_stato": "Autista arrivato fuori orario",
"descrizione": "<p>Autista arrivato fuori ...
2
votes
1
answer
178
views
ng-required, how to use it between input?
I created a form with two input repeated for X elements. Each element is required only if we put something in the other one:
My.HTML
<form ng-submit="validate();">
<div ng-reapet="elem in ...
0
votes
2
answers
260
views
Angularjs email validation without required
Title tells the problem shortly, I have a few email fields like so:
Email 1: <input type="email" name="email1" ng-model="emails.email1" />
<br />
Email 2: <input type="email" name="...