RadzenMask Pattern as an expression

Hello Radzen Team!

My app has some masks with pre-configured allowed chars, saved in the Database.
I can't get them to be included in an expression to build the pattern format, as shown below:
[^${data.field?.chars}]

Is there any workaround for this?

This is not correct syntax for Blazor. Maybe you can create additional property to your model where you can build the correct pattern and later use it with property name expression similar to all other field bindings.

1 Like

Of course! Thanks for the suggestion, worked perfectly.

        [MaxLength(100)]
        public string chars { get; set; }
        [NotMapped]
        public string pattern {
            get {
                return "[^" + chars + "]";
            }
        }