You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(form): replace all rule token instances in prompt message
Within the prompt property method of the form module, I updated the replace calls, where it replaces contextual tokens relating to the rules definition, to use a regular expression of the same respective values in order to have it replace all tokens present in the prompt text.
The tokens used are the following:
identifier
name
ruleValue
If one uses a singular token multiple times in the prompt, for example,
{ type: 'levelCheck[2]', prompt: 'Level {ruleValue} not detected. Please ensure that {name} is set to a level at least equal to {ruleValue}.' }
the first token of {ruleValue} is successfully replaced, but the subsequent {ruleValue} isn't. This change merely applies a regex with the "global" flag set in order to replace multiple tokens of the same name found in the prompt text.
0 commit comments