Comments (7)
The pattern /^[^+%{}~?^:#!|=*;,[]<>"'\¿\-]*$/
contains a closing ]
within the negated character set, causing the set to be closed prematurely.
I don't know how this used to work before, but the current behavior is expected. There is no security implications to this, as frontend data validation should never be considered sufficient to guard data validity.
from angular.
Regular expression is absolutely working fine on JAVA and other online forums like https://regexr.com/ Only, in Angular 14.2.0 its not working, that means Regular expression has no problem.
For your information @JoostK , regular expression /^[^+%{}~?^:#!|=*;,\[\]<>"'`\¿\-]*$/ is absolutely working fine on Angular 10.2.0. That means, it may be a bug in 14.2.0.
Kindly share your inputs on this.
from angular.
regexr.com has the same behavior as I mentioned:
but, when pasting the regex, it will automatically escape the closing ]
:
Doing so fixes the problem, which is actually the way to go here.
from angular.
You can check the regular expression mentioned in the query:
/^[^+%{}~?^:#!|=*;,\[\]<>"'`\¿\-]*$/
This expression is working fine on https://regexr.com/ and Angular 10.2.0 while the same is not working on Angular 14.2.0. You can check by pasting this expression on regexr.com and it will not escape any character.
from angular.
@JoostK , yes when I pasted the regular expression /^[^+%{}~?^:#!|=*;,\[\]<>"'`\¿\-]*$/ over the https://regexr.com/, it has not skipped not a single character and accepting all the letters x, f, or b.
from angular.
/^[^+%{}~?^:#!|=*;,\[\]<>"'`\¿\-]*$/ is not the regex you shared initially.
It has []
escaped => \[\]
, this is what happens when pasting it to regexr.com.
from angular.
@JoostK , your input will be required to give this thread a clear direction. Look at the regular expression in the question subject, /^[^+%{}~?^:#!|=*;,\[\]<>"'`\¿\-]*$/. Here, user is asking why it is not allowing x,f, and b characters on Angular 14.2.0 while the same is working on Angular 10.2.0 . I have validated and regular expression is correct and working fine on other language like Java, and it is working fine. It seems, problem relates somewhere from Angular Validators framework.
Can you get validate it? This can be bug in the mention version. Because I checked the regular expression online and it is working as expected.
from angular.
Related Issues (20)
- Allow setting the equal function on signal inputs HOT 2
- Associate an attribute input to a specific directive
- error in routing (unknown path) HOT 2
- Remove style guide conventional suffix rule for classes HOT 3
- Repeted text (typo) In Component In-depth guide HOT 1
- Typo on 'Helpful Note' HOT 2
- Style guide updates HOT 2
- Querying ViewChild(ren) within currently active `@switch` case HOT 2
- Versions page not found HOT 2
- can't access https://angular.dev/cli/commands HOT 2
- Support Netlify Image CDN in NgOptimizedImage HOT 1
- Host styles incorrectly applied to components in child router outlets HOT 4
- Better `hasValidator` or `getValidators` support
- Memory Leaks Caused by Component/Directives having Injector dependency in it. HOT 9
- SSR issue with page reload upon child routes HOT 2
- Doc is not understandable and duplicate topics HOT 3
- RouterLink Import Error not complain HOT 2
- Locale is not loaded automatically when using ng build, but it is when using ng serve HOT 2
- Command Reference Link redirect to 404 HOT 1
- FakeAsyncZone and RootZone used in conjunction can clobber interleaved timers of each other
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.