- Ensure killerString has a number in the first position
- The combined length of string1 + string2 + killerstring should be less than 15 characters
- I attempted to customize the
pattern
validator from Angular sources.
How can I create a customValidator with dynamic data attached? There doesn't seem to be a way to attach my dynamic information to an input field directly.
Any suggestions?
With assistance from Syed, I made progress... although it's quite hacky and may not function correctly with multiple fields using my customLength
validator:
https://stackblitz.com/edit/angular-4cvomu-zjlht5
Update 2
I discovered a SOLUTION THAT WORKS with the help of this video and that Stack Overflow post.
One issue still remains:
- Updating string1 or string2 does not trigger validation in
killerInput
...