Validate input Text field based on position in Angular2

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Validate input Text field based on position in Angular2



Basically I am a beginner to Angular as well as java script. Here am trying to validate a Reactive form Text field with some conditions.



Conditions are:



Asterisk() is allowed to give as input from 5th to 13th position , and everything else is considered as invalid after Asterisk().
Eg: 8500*001001… (Invalid) 8500* (valid)



I am aware to write simple custom validations. If any one having idea please help me out or you can suggest me as well. Thanks in Advance.





Forget angular and think about the fundamentals. Write a plain old function and test it. Then use it as a validator.
– Aluan Haddad
2 hours ago





can you give an example I don't get the 2,3 point
– Muhammed Albarmawi
2 hours ago





@MuhammedAlbarmawi updated.
– Royal
1 min ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived