New to Telerik UI for ASP.NET MVCStart a free 30-day trial

Error Handling

Updated on Feb 11, 2026

When the SmartPasteButton is used in a form scenario, the pasted clipboard content may not contain values for all required fields. In such cases, the form validation indicates which fields require user input.

For a complete example, refer to the demo on error handling of the SmartPasteButton.

Clearing Validation Error States

In the demo, the reset button calls onClear() to remove invalid state classes and validation messages when the clipboard content is incomplete.

Razor
@(Html.Kendo().Form<ResponsiveFormViewModel>()
    .Name("responsiveForm")
    .Orientation("vertical")
    .SmartPaste(s => s
        .Name("smartPaste")
        .Service("https://demos.telerik.com/service/v2/ai/smartpaste/smartpaste")
        .Text("Smart Paste")
    )
    .ButtonsTemplate(
        "<button id='clearButton' type='reset' onclick='onClear()' " +
            "data-role='button' class='k-button k-button-md k-rounded-md k-button-flat k-button-flat-base' " +
            "role='button' aria-disabled='false' tabindex='0'>" +
            "<span class='k-icon k-font-icon k-i-arrow-rotate-ccw'></span>" +
        "</button>"
    )
    .Validatable(v => v.ValidationSummary(false))
)

For details on handling request lifecycle and errors during processing, refer to the Events article.

See Also