Validate input Text field based on position in Angular2

Clash Royale CLAN TAG#URR8PPPValidate 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.
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.
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