Xamarin Community Toolkit RequiredStringValidationBehavior

The RequiredStringValidationBehavior is a behavior that allows the user to determine if text input is equal to specific text. For example, an Entry control can be styled differently depending on whether a valid or an invalid text input is provided. Additional properties handling validation are inherited from ValidationBehavior.

Syntax

<Entry>
    <Entry.Behaviors>
        <xct:RequiredStringValidationBehavior
            InvalidStyle="{StaticResource InvalidEntryStyle}"
            RequiredString="OK"
        />
    </Entry.Behaviors>
</Entry>

Properties

Property Type Description
RequiredString string The string that will be compared to the value provided by the user.

Sample

You can see this in action in the Xamarin Community Toolkit Sample App.

API