New to Telerik UI for Blazor? Download Free 30-day trial
Signature - Validation
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
The Telerik UI for Blazor Signature component allows you to integrate it in an edit form. This is useful for scenarios, where you want the end-user to make a confirmation (e.g. apply for a certain thing, receive documents, etc.) and submit their decision using the provided form.
In order to use the Blazor Signature component in a form, you need to add its declaration inside an EditForm or TelerikForm tag and map its Value parameter to a form data model property that contains a validation rule.
The current demo shows a sample declaration of a customized form, which includes custom editors for entering user profile information as well as a field, which includes their signature. If the user does not enter their signature by drawing it in the Blazor Signature component, then the form submit action will fail as adding a signature is required in order to confirm that the user has made a confirmation.
As the Blazor Signature Value parameter is a string value, which represents a base64-encoded value handwritten signature, you can apply various validation rules to it. One of the common validation rules will be making the value a required field as signatures can vary and checks like MinLenght or MaxLength are not optimal in the general case.