MarianV
February 18, 2024, 12:25am
1
Hi,
A proposal this time
Since we will have lots of validators everywhere, and Ctrl+K+D (in Visual Studio 2022) auto-format of markup changes this:
into this:
it would be exceptionally useful to have a control property on the validator where we can set the text as to avoid it becoming 3 lines instead of one line…
MarianV
February 18, 2024, 2:34am
2
MarianV
February 18, 2024, 9:41am
3
UPDATE
I’ve derived <dot:Validator
into a custom code control, <ccc:NGMValidator
and it works, as intended, as a one-liner:
But,
Why does my custom code control property called ErrorMessage
appear as suggestion in other controls, even on simple html elements ?
I don’t want this to happen, please advise.
Here is my NGMValidator
code:
exyi
(Standa Lukeš)
February 18, 2024, 1:41pm
4
Because it has the [AttachedProperty]
attribute.
Other Validator properties can be used on other controls essentially turning any control into a validator, I suppose you copypasted it from there.
1 Like
MarianV
February 18, 2024, 2:29pm
5
Yes! This was it.
Your guess was right, I copy pasted from a Validator
property’s code.