Questions tagged [angular-validation]

Angular 2+ validation patterns, syntax and properties. Validation of forms, controls, models using various Angular 2+ validation directives.

Angular's built-in form properties are there to help us with client-side validation.

You can either:

425 questions
0
votes
1 answer

Show custom validation on form load(AngularJs 1.6)

I have a custom validation like this: app.directive('checkRfc', function() { return { require: 'ngModel', link: function(scope, element, attr, mCtrl) { function checkRfcValidation(value) { if…
gof
  • 25
  • 8
0
votes
1 answer

Angular 2: Length validation not working

I am trying to simply replicate the walkthrough from the Angular website but cannot get length validation to work:
Jeremy Thomas
  • 6,240
  • 9
  • 47
  • 92
0
votes
1 answer

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 the state of the field is invalid (even if i select…
Shiva
  • 358
  • 2
  • 15
0
votes
1 answer

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-invalid-required. if I add in the tpl of the…
Olivvv
  • 1,140
  • 1
  • 13
  • 37
0
votes
0 answers

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 translation. This is my…
Motomine
  • 4,205
  • 5
  • 20
  • 23
0
votes
0 answers

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", required = "required", @ng_model =…
Mox Shah
  • 2,967
  • 2
  • 26
  • 42
0
votes
1 answer

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 jQuery Validate, I've found that the…
0
votes
1 answer

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()]
-1
votes
1 answer

How to show one password validation message at a time, if their are multiple ones in Angular?

Followed below pattern for Validating Input Fields :. At least 6-15 Characters long At least 1 Lowercase Characters (a-z) At least 1 Uppercase Characters (A-Z) At least 1 Digits (0-9) At least 1 Special Characters (*$@#) So, Basically I want to…
-1
votes
2 answers

angular regex is not working for 12 digit validation check

config.newValue has value as "888888888888" and config.regex has value as "/[0-9]{12}/" let matches = String(config.newValue).trim().match(config.regex); variable matches should return value as true but it is returning value as null . Can anyone…
sukesh
  • 21
  • 1
  • 5
-1
votes
2 answers

How do I conditionally validate input fields in my reactive form?

I have a form where a user can register thesmselves or a guest. If a user is registering themselves, I don't need to validate guest info input fields, and I do need to do it if a guest is being registered by a user. This is the link to…
Noob
  • 2,247
  • 4
  • 20
  • 31
-1
votes
1 answer

Angular Email Validator, How to implement to update? Its possible parameters

I have apply a specific email validator, it works when I create the user, but if I try update any user, the email validator sends message email in use. In another words its behaviour when I create, but I need when I update the user if id and email…
-1
votes
1 answer

Async validator and mat-autocomplete not working together

In the validate function I do a request to the api to check if the data validates and that works fine. But if the value is an object I just return null but that breaks the mat-autocomplete (the panel never closes). import { ChangeDetectionStrategy,…
-1
votes
1 answer

Validation not Triggered When Custom FormControl Is Added to FormArray

I have a form group which has an array of custom form controls (Custom form control also has validation). Whenever I push a new form control to the array, the validation for the complete form is not run properly. It seems that when a new form…
Lilylakshi
  • 736
  • 7
  • 19
-1
votes
1 answer

angular 8 reactive form with custom ng-select not touched programmatically

I have a custom angular reactive form with ng-select in it with other components. While validating the form I added the below code private validateCustForm() { this.validation.touchFormControls(this.appointmentForm); if…
Arun
  • 3,640
  • 7
  • 44
  • 87
1 2 3
28
29