MIM 2016: Limit the number of characters for an attribute

I want to limit the number of characters on an attribute, I want to be able to type any character in the attribute, all I want is the character limit set to 34 characters. There are 3 places to do it

  1. In the RCDC control
  2. In the validation tab of the Attribute (must be indexed string) – Regex
  3. In the validation tab of the binding of the attribute to an object – Regex

I am going to focus on the Regex expression for (2) and (3). This will work

^.{0,34}$

For the RCDC

<my:Property my:Name="RegularExpression" my:Value="{Binding Source=schema, Path=Alias.StringRegex, Mode=OneWay}"/>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s