The textbox on my Blazor app is being validated using a [RegularExpression] attribute. This attribute needs to be dynamic, in that I need to be able to change the validation string "on the fly". I have working code that can change the string inside the attribute, but when the validation occurs, the new string is reset back to the original string. Debugging the code shows that the attribute's constructor is being called during the validation event which resets back to the original validation string. Does anyone have any ideas on how to remedy this issue? I can provide the code if needed.
TIA