145 questions
0
votes
1
answer
1k
views
How to set Date in angular.js?
I want maxDate to be selectable as today at most, (old days should be clickable, but not tomorrow)
the day between i select as maxDay and minDay should be 365 days at most, it cant be selected more ...
0
votes
1
answer
64
views
Validation of dynamically named input fields in AngularJS
I have an input field inside an ng-repeat, which gets a dynamic name tag, like so:
<div ng-repeat="a in b track by $index">
<div show-errors >
<label for="...
0
votes
1
answer
460
views
Is it possible to use function input to create a variable name?
Pretty sure that my title is misleading... Oh well.
So basically, I'm trying to create a game and I have a bunch of arrays with names like ItemsInG5Array, ItemsInB2Array where G5 and B2 are nodes of ...
2
votes
0
answers
600
views
Custom validation in input field for unique value
I've to use AngularJS 1.7 for a project where I have a form and have to validate an input field to be required, to have a particular pattern and to have unique values. For this I'm doing this :
...
0
votes
3
answers
671
views
Angularjs Form validation How can i get values inside Controller
This is my Html Part
<form name="userForm" ng-submit="submitForm()" novalidate>
<!-- NAME -->
<div class="form-group" ng-class="{ '...
0
votes
1
answer
63
views
How can create validation for single control's value required from multiple control in angularjs(1.*.*)
i.e, I have four text boxes if I enter a value in any text box out of all text box, it should be allowed to submit otherwise throw an error,"Value is Required",
It is possible using angularjs ...
1
vote
0
answers
547
views
AngularJS - Validate when ng-model value not in Select options
I have a situation where the ng-model value may sometimes not be present in the ng-options list of a Select dropdown (ID of a user that is no longer with the company saved in a record, for example). ...
2
votes
2
answers
123
views
Angular JS form validation in "myApp" application.
I am new to AngularJS and try to implement form validation in "myApp" app.
I wrote the code below. The {{result}} should output "true"/"false". But it didn't work.
<script src="https://ajax....
-1
votes
3
answers
447
views
Angular JS form validation not working even the other forms work ok
i'm working on a school project. My project has some forms that need to be validated. Login and register form validation work well but the other form used to upload item is not validated. I have tried ...
0
votes
1
answer
680
views
Angular JS dropdown list select "Others" option and Others input become mandatory
I am trying to add a dropdown list with "Others" option. If user select "Others", Others (Please specify) input box will become Mandatory. How should I validate this case? Right now I added Javascirpt ...
0
votes
4
answers
4k
views
Angular validation on submit
I am trying to create a form that, if you do not fill out any of the fields, will show an alert message if you hit submit. I am trying to work with angular validation to make this happen; however, it ...
0
votes
3
answers
1k
views
ng-show is not working for one of the similar input fields
I have a multistep form. I have ng-show which depends whether or not the input[type="text"] is empty.
Now, it works for one section of the form, but doesn't work for another section of the form.
<...
0
votes
0
answers
48
views
Checkbox valiadtion using Angular Js
I am using Angular js, in which i have a textbox and collection of checkbox. I want to check if atleast one checkbox is checked when the submit button is clicked. Below is the existing code:
<form ...
1
vote
0
answers
597
views
Validation using AngularJs on button click event
I have a AngularJs form which contains textbox,textarea,dropdown,checkbox, date, time controls, ng-repeat textbox and textarea controls. I want to validate these controls only on submit button click ...
2
votes
2
answers
4k
views
"Required" validation doesn't work in <select> with default value
I have a required <select> field:
<select name="service_id" class="Sitedropdown" style="width: 220px;"
ng-model="ServiceID"
ng-options="service.ServiceID as service....
0
votes
1
answer
1k
views
Angular directive change ngmodel value from null to undefined breaks validation
I have created a plnkr to describe my problem: Link to plnkr
Problem description:
I have a number field, the value from which is written to the model. First I implemented this feature like the first ...
0
votes
1
answer
112
views
$error.required message is not getting reset on reset button : AngularJs
<div class="form-group">
<input type="text" name="Name"
data-ng-model="panNumber" required>
<p data-ng-show="loginForm.Name.$error.required && (loginForm.Name.$touched ...
4
votes
2
answers
4k
views
Cannot read property '$valid' of undefined if form is inside a div with ng-if condition
I have a form inside a div with ng-if condition. Initially form is closed. On click a button, form is displayed. But on submitting form, I'm getting Cannot read property '$valid' of undefined error. ...
1
vote
2
answers
599
views
angularjs form validation that has an internal form
I have a form by some input. and some time I have another form by some input into this form.
when I have not internal form, my parent form is valid, but when I have internal in original form and ...
3
votes
1
answer
2k
views
Angular Form Validation: $error.required set even when ng-required=false with custom input directive
I have Custom input component with validation with ngMessages,FormController and ng-required:
<div class="col-sm-9 col-xs-12">
<input
id="{{$ctrl.fieldName}}"
name="{{$ctrl....
3
votes
0
answers
553
views
Validate dynamically created Check box and Radio buttons
I have an application in which dynamically check boxes and radio buttons get generated based on the data sent from the server. The number of check box/radio button displayed can increase up to 20 (in ...
0
votes
1
answer
99
views
Input validation: Validation message and ng-disabled buttons not working as expected
I have the following code which I'm trying to validate using AngularJS:
<div ng-form="transWizard" novalidate>
<div style="word-wrap:break-word; padding-top:4px; padding-left:14px">
...
1
vote
1
answer
2k
views
How to enable AngularJS validation for button that is outside of form?
I am new to angular, I was struck to trigger a form validation with the button outside the form. I have two buttons one inside form, which works and one outside, I want the outside button to do the ...
4
votes
2
answers
1k
views
AngularJS form input name validation not working in ngrepeat
name="number-{{$index+1}}" working in ng-repeat at the same time myform.number-{{$index+1}}.$invalid does not working for the form
Demo: http://plnkr.co/edit/Z3EmpHu8w2iZcZko9dJv?p=preview
var ...
0
votes
1
answer
952
views
angularjs single input filed for both email and mobile number
In the registration form i have single field for both email and mobile number but it doesn't working properly.
<form name="regForm" >
<md-input-container flex md-no-float>
<...