All Questions

0
votes
0answers
28 views

Validate only one field ng-required angularjs

How to validate only one field in form with different button-click rather that submit button? <textarea class="form-control" rows="2" ng-model="vm.foo" ng-required="true"></textarea> <...
0
votes
1answer
38 views

How to add composeAsync to angular 5 validators

I'm working on an Angular 5 forms module using reactive forms approach. In that form for one of my form controls, I need some back-end validation to be done, Can someone help to implement composeAsync ...
0
votes
0answers
30 views

Is it possible to fire an event only once if any part of an Angular form element comes into focus?

I'm working with Angular forms and trying to see if there is a better way to fire an event on the first initial focus of any cell within a form. This way the event only gets called once. I am aware ...
0
votes
0answers
31 views

Angularjs How can i set validation for email exist

please help me how can i validate this textbox <input type="text" name="emailtxt" ng-model="emailsId" validate-email-foo /> <span class="help-block" ng-show="(f1.emailtxt.$error....
0
votes
1answer
25 views

Angularjs validation are showing Error meassage even after validate

Here why my validation are not working what wrong I'm doing pllease help me <div ng-controller="LoginCtrls"> <form novalidate name="f1" ng-submit="SaveData(User)"> <div ...
1
vote
0answers
28 views

Added validation constraints to inputs dynamically, but Angular not initialising them

I have tried adding attributes such as ng-required="true" and ng-pattern="/^(d)+$/" dynamically as DOM is compiled by Angular. They are added and appear on the element when I inspect the element, ...
0
votes
1answer
77 views

How to restrict specail character Grave accent (backtick) in text box using angular js

i wants to validate text box which allows special character like []^_,atoz,1 to 10 characters.am using ng-pattern="/^[a-zA-Z0-9]*$/" it allows to enter but it doesnot enable submit button.But the ...
0
votes
2answers
314 views

AngularJs validate input length for multiple lengths

I have an input that should validate only if input length is 11 or 14. Is there any way of achieve this without create a directive? There's one more thing: I'm using a mask that formats the input ...
1
vote
1answer
57 views

Angular js validations for a form in ng-repeat is not working as expected

I have a table, in which I have repeated the <tr> tag by using ng-repeat="cancellationPercentData in cancellationPercent" Inside this tr tag I have a form with name and id set by using $index ...
1
vote
1answer
333 views

AngularJS form validation failing when input populated dynamic

I have the following form: If I click on a star, the input will be automatically populated with the number of the clicked star. (clicking on the 3rd star the input will be populated with number '3' ...
2
votes
1answer
515 views

AngularJS Input valid if value is in array

Having an input <div ng-app="myApp" ng-controller="myCtrl"> <form> <input type="number" ng-model="$ctrl.myNumber" /> </form> </div> I want it to be ...
1
vote
1answer
86 views

Angularjs allow one decimal number with after

<input type="number" name="content" md-auto-focus ng-model="vm.model.content" ng-...
3
votes
6answers
8k views

How to show error messages for min and max values of an input field with number type?

How do I set/show error messages for min and max values that I set on an input field with number type using angular js. <input type="number" min="0.1" max="30"/>
0
votes
1answer
301 views

Validate that 2 angular Form fields do not have the same content

I have an angular form consisting of two fields location A and Location B. What I'd like to achieve is a directive that compares both fields and validates accordingly, style the valid or invalid ...
0
votes
0answers
345 views

How to validate the form using if condition with multiple errors in Angularjs?

I have a scenario,I have to validate the form on click of submit button,but I have a function with multiple error messages in a function using if condition.I have to display the respective error ...
0
votes
1answer
43 views

Validate set of radio buttons using AngularJS

my code looks like this: <ng-form name="form"> <div> Question 1 <label> <input type="radio" ng-model="q1" style="visibility: initial; position: ...
2
votes
0answers
710 views

ng-required not working properly on select the value from dropdown

I have Date of birth drop down field,from that i selected the month,date and year values from dropdown.After selecting them as the error message showing previously it worked fine. my code for that: ...
2
votes
1answer
75 views

How to Enable/Disable html controls' validation in AngularJS

I have a radio button group. First one for "Inside Bangladesh" and Second one for "Outside Bangladesh". If i click "Inside Bangladesh" no validation required for Address field(textbox), but If i click ...
0
votes
1answer
170 views

ng-invalid ng-invalid-required showing error message

i am using form,have the row called DOB,user has to select the month,date and year,But the problem is even i select the date and year also showing the error message . when i start debugging noticed ...
0
votes
1answer
67 views

how to reflect validation state on a custom element?

I have built a custom angular component to select multiple elements from a collection. This custom element has an array as ngModel. I would like it to reflect the validation state, i.e : ng-invalid ng-...
0
votes
0answers
74 views

Translating JQuery validator messages with nggetext

I'm using angularJS and I want to translate the require messages that JQuery validate has. For translations I'm using grunt nggettext, which works perfectly. The problem is that is not filtering the ...
0
votes
2answers
769 views

Angularjs ng-disabled

I have two inputs for validating email and password. I can see individuals of the following works: myForm.$error.required validating input form with required input value and myForm.email.$valid ...
8
votes
6answers
2k views

How to use the Angular jQuery Validate's checkForm() function

EDIT: I've added a JsFiddle so you can easily troubleshoot instead of having to set up the environment yourself. As you can see, validation is done on the Email field even before the blur event on ...
0
votes
0answers
32 views

AngularJS validation with nested entity not working

I'm working on big form for one of my project. This is how I'm designing my form @Html.EditorFor(model => model.EmployeeMaster.EMP_FirstName, new { htmlAttributes = new { @class = "form-control", ...
-1
votes
2answers
429 views

Triggering form validation programmatically in angular-js

I am using a custom directive to submit a form programmatically however no form validation is applied before submitting the form. I have called $setDirty() on the form field and $setSubmitted() on the ...
0
votes
1answer
212 views

How to apply class level validation rules using the Angular implementation of jQuery Validate

I have used jQuery Validate's handy addClassRules function to apply a rule to all elements of a given class rather than relying on the elements' name attribute values. In using the Angular wrapper of ...
3
votes
1answer
904 views

Angular Form Validation inside ngRepeat

I have a series of table rows with various inputs inside of an ng-repeat and I'm trying to use angular's built in form validation to handle required fields. Everything works well except for when I ...
0
votes
1answer
27 views

Angular Validation on Submit with A Dotted Function Name

I am trying to call a 'custom validation directive' by watching the ngModel. My submit function name is dotted.[sllr.save()] <div class="col-sm-10"><input type="text" placeholder="must be ...
1
vote
2answers
96 views

How to make angular.js validation work inside a <form> tag

I wrote this code but it doesn't work when I place my app inside of <form name="myForm">... tag. What should I do to make it works! (whenever I place myForm inside of ng-app it works, but my app ...