Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
0 answers
82 views

I have an input tag <div class="form-group" ng-form name="patientLinkingForm"> <input type=&...
Ishmeet Singh's user avatar
1 vote
0 answers
48 views

I have some sets of patterns in my controller. I am trying to set this pattern dynamically for ng-pattern using ng-repeat. Pattern example : $scope.codePattern = (function () { var regexp = /^([a-zA-...
user14118739's user avatar
0 votes
0 answers
71 views

I need some help in that i have validation working partially. When one selects a payment method called CC the user input needs validation to kick in instantly and wont allow one to input the wrong ...
Lenny Kamande's user avatar
0 votes
1 answer
425 views

I am writing an app with AngularJS 1.5. I am trying to write a feature where the user can verify their password in the app and I am using ng-messages to try to validate the form. My from has 2 fields:...
user1261710's user avatar
  • 2,647
0 votes
1 answer
107 views

My directive is below. What i want is that to allow alphabetical caharacters and special characters but not numbers. How can we changed that based on my code below.Thank you. app.directive('...
user avatar
0 votes
0 answers
77 views

I have performance problems with ng-pattern on a textarea input. I have a Regex expression to simply check if the code contains script, image or iframe tag. If I paste a script with multiple lines, ...
Nicolas Gehlert's user avatar
0 votes
0 answers
191 views

I've been stuck on a problem for a while now and I feel I've exhausted all efforts. I have a dynamic form created using an ng-repeat, for some reason ng-pattern will not work in this scenario, ng-...
Darren Eccles's user avatar
1 vote
1 answer
50 views

I've been working on a regex problem for angularJs ng-pattern which needs: Cannot be blanks A minimum of 1 character and a maximum of 32 characters Spaces ONLY are not allowed Acceptable special ...
user1070111's user avatar
0 votes
1 answer
719 views

i have to validate the text box which shows the error message when user enters 4 digit as 9999.so i have used the ng-pattern method to show error message but ng-pattern does n't allow to update the ...
Sathish's user avatar
  • 169
1 vote
2 answers
728 views

I am working on a transaction form. In the form, there is a field name Amount. I am using this ng-pattern i.e. ng-pattern="/^[1-9][0-9]{0,2}(?:,?[0-9]{3}){0,3}(?:\.[0-9]{1,2})?$/" which allow only ...
Nishant's user avatar
  • 127
1 vote
1 answer
727 views

In my angularjs form, I am checking the password pattern with a regex that checks for multiple conditions. Based on different condition checks of this regex, I want to change the css for one of the ...
Bonnard's user avatar
  • 379
0 votes
1 answer
911 views

I'm working on custom form validation for an Angular application using ng-pattern. In my form I have: <form name="jobsForm" id="jobs-form"> <div jobs-form jobs="jobs"> <...
Sara Fuerst's user avatar
  • 6,138
0 votes
3 answers
3k views

I want to do like this : 3.40 and not more than 3 characters and one dot: <md-input-container class="md-block"> <label>Marks/CGPA</label> <...
monir tuhin's user avatar
0 votes
3 answers
933 views

I made a small js here I also add the code to the Stack overflow snippet but for some reason it doesn't work to me var myApp = angular.module('myApp',[]); function MyCtrl($scope) { $...
Robdll's user avatar
  • 6,283
0 votes
2 answers
2k views

I want to validate a text input in form, so the submit of the form could not be done until the input match a regular expression. But when I type a wrong field value and I clik submit the form is ...
MABC's user avatar
  • 605
1 vote
1 answer
264 views

<input type="number" name="content" md-auto-focus ng-model="vm.model.content" ng-required=...
vegan's user avatar
  • 7
0 votes
1 answer
832 views

How to treat 1 and the number of decimals should be zero eg) 1.000 as same show the alert pop up number should be same.And the maximum number length of the texbox is 7. eg)1 and 1.00000001 be ...
Mohamed Sahir's user avatar
0 votes
1 answer
2k views

I have a phone number input field where it must: Allows spaces and "-" and "+" characters. Have 12 characters max including the special characters (ex +12345678910). I tried but my best result was ng-...
Anna's user avatar
  • 909
-1 votes
2 answers
400 views

I want my input text to accept following characters only 1,2,3,4 and 5+ And to validate the above character I need a regular expression (ng-pattern). Is their any perfect website to learn Regular ...
Himanshu Shekhar's user avatar
0 votes
2 answers
4k views

I have regex for IPv4 address: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$ and i have regex for IPv4 CIDR range : ^(([0-9]|[1-9][0-9]|...
user7353226's user avatar
-2 votes
1 answer
24 views

I need to match the pattern only if << or >> or ]] or [[ is not present in the string. If any of these special characters are present the match should be zero else it should match. For ...
user4895544's user avatar
0 votes
1 answer
3k views

I have a password where It should be minimum 8 character with alpha numeric and symbol except &,",% .I given ng-pattern and restricted few symbols. but when I type & too it is accepting. This ...
Nicoleta Wilskon's user avatar
0 votes
2 answers
103 views

I want to create a regex expression that I can pass to ng-pattern so that the input can only be valid if the string has only uppercase/lowercase latin letters from a to z, n with tilde, and vowels ...
Edd's user avatar
  • 1,988
-1 votes
2 answers
1k views

Following this bit of code: <label class="checkbox-label"> <input name="radio1" type="radio" ng-model="myModel.radio" required ng-required="true" ...
Rafael Herscovici's user avatar
-1 votes
1 answer
74 views

I'm using a regex to validate a form input. So basically a user can input "SELECT some_name of select_match". So far I have the regex: \bSELECT\b \bof select_match\b The last part is the middle part, ...
D. Gal's user avatar
  • 339
4 votes
2 answers
195 views

In my Angularjs application I need to have regular expression for two patterns for form validation with the following condition. Pattern 1 : The input box should accept alphanumeric with no space ...
Madasu K's user avatar
  • 1,875
2 votes
1 answer
2k views

I want to use ng-pattern validate my text input field that should accept only Hebrew characters, sometimes the input are ok and sometimes they are being rejected for some reason. (the first one is ...
Adleron's user avatar
  • 83
5 votes
2 answers
38k views

Hi I don't know much about regular expression. But I need it in form validation using angularJs. Below is the requirement The input box should accept only if either (1) first 2 letters alpha + 6 ...
shreyansh's user avatar
  • 1,687
4 votes
2 answers
10k views

I need to validate the mobile number first text input starting with 04 should be total 10 digits including 04(eg : 0412345678) my input field is below <form name="uploadForm"> <input type="...
sheravanan's user avatar
0 votes
2 answers
440 views

Am using the regex /^[0-9]+$/ to limit the input of the text box to only accept numbers. It's working fine but when the types something like +124 then also it's not setting the text box as invalid. &...
vinnu313's user avatar
0 votes
2 answers
4k views

I try to validate the input of restricted characters. The input field only accept alphabet, dash and underscore characters. When I test the code below, the first character is accepted, but the second ...
Jonathan Anctil's user avatar
1 vote
1 answer
684 views

I'm having little hard time with a regular expression. Any help would be greatly appreciated. Problem: I want display an error when user enters drive letters in the path. for example: if user enters ...
pmh's user avatar
  • 69
0 votes
0 answers
200 views

I'm attempting to add ng-pattern to specific inputs on specific forms using the following directive. It's adding the ng-pattern, but the validation isn't working. However, the validation works fine ...
The Vanilla Thrilla's user avatar
0 votes
1 answer
3k views

I want to enter in up to 10, 8 character length numbers in one text field all separated by commas. For example, 12345678,12345678,12345678,12345678..... The only thing is the numbers can only be 8 ...
McMintz's user avatar
  • 254
0 votes
0 answers
38 views

NET MVC, HTML 5 and Angularjs, i am having trouble on using ng-pattern in the password field validation. this is my pattern ng-pattern="/^(?=.*[0-9])(?=.*[!#$%^&*])[a-z0-9!#$%^&*]{8,16}$/" I ...
user avatar
2 votes
1 answer
2k views

I have this as my regex pattern (^([Aa][Ss])[0-9]{8})|(^6[0-9]{7}) i get console errors below, but it works!: libraries-c8d65edf41.js:22505 Error: [$parse:lexerr] Lexer Error: Unexpected next ...
Frederick Mfinanga's user avatar
12 votes
4 answers
36k views

I want to validate password entered by user for following criteria : Password should be at least 8 characters long and should contain one number,one character and one special character. For it I ...
PHPLover's user avatar
  • 13k
0 votes
1 answer
703 views

I want to validate a text input with ng-pattern directory in AngularJs. The text input can have multiple IP addresses and IP ranges with , (comma) separated. for an example; 172.168.21.3, 172.168....
S.L. Chandrasinghe's user avatar
1 vote
2 answers
590 views

i am looking for a regular expression to put in ng-pattern attribute of angular. i am looking for an expression that satisfies only a specific decimal pattern i.e. exactly one digit --> than a ...
Raas Masood's user avatar
  • 1,605
-1 votes
1 answer
495 views

How can I validate emailid and mobile no both in a single input box in AngulaJS? I'm trying to validate emaild and mobile no in same input box. it is working fine seperately, but for both emaild ...
jay's user avatar
  • 1
5 votes
2 answers
3k views

In ng-pattern we have the option of specifying that the field should match a specific pattern. How can we specify that it should NOT match the specified pattern? Example, <input type="text" ng-...
Tarun Dugar's user avatar
  • 8,993
2 votes
3 answers
1k views

I have arrived at a regex for file path that has these conditions, Must match regex ^(\\\\[^\\]+\\[^\\]+|https?://[^/]+), so either something like \server\share (optionally followed by one or more "\...
looneytunes's user avatar
4 votes
3 answers
8k views

I have a ng-pattern validation for a regex of ^[^\./:*\?\"<>\|]{1}[^\/:*\?\"<>\|]{0,254}$ which basically tests the invalid chars in filepath and teh limit. but when i have the ng-pattern ...
looneytunes's user avatar
0 votes
1 answer
875 views

Can't seem to find any info on this. Is it possible to use ng-pattern on a contenteditable div? When I try it doesn't work: <div contenteditable="true" ng-model="x.number" ng-pattern='/^(\d)+$/'&...
RobPio's user avatar
  • 137
1 vote
2 answers
1k views

I am facing one weird issue when trying to use ng-pattern with input type number. <input type="number" name="input" min="0" max="1000" data-ng-model="input" ng-pattern="/^[0-9]*$/"> <div ...
TheKingPinMirza's user avatar
0 votes
1 answer
149 views

The pattern validation using angular ngPattern is not working after upgrading the Angular JS library to 1.4.1. See the code below. <form class="form-horizontal" name="someForm" role="form" ...
Saidh's user avatar
  • 1,141
1 vote
1 answer
639 views

I'm trying to wrap an <input> in a directive so that I can handle date validation and convert it from a string to an actual Date object and maintain the Date version in the original scope. This ...
Cineris's user avatar
  • 581
1 vote
3 answers
2k views

I am working on an angular app and I needed to put a pattern validation on a select element. Just using ng-pattern on select didn't work. So I created a hidden input with same model with ng-pattern on ...
echo_salik's user avatar
-1 votes
1 answer
1k views

I am using a form to get user details. In my name input I want only alphabetic characters, spaces and apostrophe. So I created the form input like <input placeholder="FULL NAME" type="text" ng-...
Muhammad Raihan Muhaimin's user avatar
3 votes
2 answers
3k views

I really struggling with this. I need to force the user to write the first and last name, in only one textbox. I using AngularJS, and I want to validate text field using ng-pattern. The field should ...
Liam's user avatar
  • 83