Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

In Blazor, is there a way to have dynamic regex strings in a RegularExpression attribute?

$
0
0

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


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>