From a80391218661bcabb26527778647cfffd708ba6d Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:43:29 -0400 Subject: [PATCH 1/5] jQuery unobtrusive validation isn't supported --- aspnetcore/blazor/forms/index.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aspnetcore/blazor/forms/index.md b/aspnetcore/blazor/forms/index.md index ebaff94073a5..e2f3588b15db 100644 --- a/aspnetcore/blazor/forms/index.md +++ b/aspnetcore/blazor/forms/index.md @@ -436,6 +436,16 @@ In Blazor Web Apps, client-side validation requires an active Blazor SignalR cir All of the [data annotation built-in validators](xref:mvc/models/validation#built-in-attributes) are supported in Blazor except for the [`[Remote]` validation attribute](xref:mvc/models/validation#remote-attribute). +jQuery validation isn't supported for Razor components. For client-side validation, we recommend any of the following approaches: + +* For either a Blazor Web App that adopts interactive rendering or a standalone Blazor Web Assembly app, follow the guidance in . +* Use native HTML validation attributes (see [Client-side form validation (MDN documentation)](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation)). +* Adopt a third-party validation JavaScript library. + + + +For statically-rendered forms on the server, providing a new mechanism for client-side validation is under consideration for .NET 10 in late 2025. For more information, see [Create server rendered forms with client validation using Blazor without a circuit (`dotnet/aspnetcore` #51040)](https://github.com/dotnet/aspnetcore/issues/51040). + ## Additional resources :::moniker range=">= aspnetcore-8.0" From c86d38c5b723c984c881fcc5b94a25b322e10293 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:44:35 -0400 Subject: [PATCH 2/5] Updates --- aspnetcore/blazor/forms/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/blazor/forms/index.md b/aspnetcore/blazor/forms/index.md index e2f3588b15db..68997fdbf584 100644 --- a/aspnetcore/blazor/forms/index.md +++ b/aspnetcore/blazor/forms/index.md @@ -439,7 +439,7 @@ All of the [data annotation built-in validators](xref:mvc/models/validation#buil jQuery validation isn't supported for Razor components. For client-side validation, we recommend any of the following approaches: * For either a Blazor Web App that adopts interactive rendering or a standalone Blazor Web Assembly app, follow the guidance in . -* Use native HTML validation attributes (see [Client-side form validation (MDN documentation)](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation)). +* Use native HTML validation attributes (see [Client-side form validation (MDN documentation)](https://developer.mozilla.org/docs/Learn/Forms/Form_validation)). * Adopt a third-party validation JavaScript library. From 3fb9899134ad634164298403edc5a686cc8034ca Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:45:18 -0400 Subject: [PATCH 3/5] Updates --- aspnetcore/blazor/forms/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/blazor/forms/index.md b/aspnetcore/blazor/forms/index.md index 68997fdbf584..da5258fac1cf 100644 --- a/aspnetcore/blazor/forms/index.md +++ b/aspnetcore/blazor/forms/index.md @@ -444,7 +444,7 @@ jQuery validation isn't supported for Razor components. For client-side validati -For statically-rendered forms on the server, providing a new mechanism for client-side validation is under consideration for .NET 10 in late 2025. For more information, see [Create server rendered forms with client validation using Blazor without a circuit (`dotnet/aspnetcore` #51040)](https://github.com/dotnet/aspnetcore/issues/51040). +For statically-rendered forms on the server, a new mechanism for client-side validation is under consideration for .NET 10 in late 2025. For more information, see [Create server rendered forms with client validation using Blazor without a circuit (`dotnet/aspnetcore` #51040)](https://github.com/dotnet/aspnetcore/issues/51040). ## Additional resources From e014937e4bba11ddede0246e09a140f41855c66d Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:50:46 -0400 Subject: [PATCH 4/5] Updates --- aspnetcore/blazor/forms/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/forms/index.md b/aspnetcore/blazor/forms/index.md index da5258fac1cf..245e8c4b00dc 100644 --- a/aspnetcore/blazor/forms/index.md +++ b/aspnetcore/blazor/forms/index.md @@ -436,9 +436,11 @@ In Blazor Web Apps, client-side validation requires an active Blazor SignalR cir All of the [data annotation built-in validators](xref:mvc/models/validation#built-in-attributes) are supported in Blazor except for the [`[Remote]` validation attribute](xref:mvc/models/validation#remote-attribute). -jQuery validation isn't supported for Razor components. For client-side validation, we recommend any of the following approaches: +jQuery validation isn't supported in Razor components. We recommend any of the following approaches: -* For either a Blazor Web App that adopts interactive rendering or a standalone Blazor Web Assembly app, follow the guidance in . +* Follow the guidance in for either: + * Server-side validation in a Blazor Web App that adopts interactive rendering. + * Client-side validation in a standalone Blazor Web Assembly app. * Use native HTML validation attributes (see [Client-side form validation (MDN documentation)](https://developer.mozilla.org/docs/Learn/Forms/Form_validation)). * Adopt a third-party validation JavaScript library. From e270aa1ef317211fdf7e9bbc77029209ef463504 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 21 Oct 2024 16:19:08 -0400 Subject: [PATCH 5/5] Updates --- aspnetcore/blazor/forms/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/blazor/forms/index.md b/aspnetcore/blazor/forms/index.md index 245e8c4b00dc..707b364c2455 100644 --- a/aspnetcore/blazor/forms/index.md +++ b/aspnetcore/blazor/forms/index.md @@ -439,7 +439,7 @@ All of the [data annotation built-in validators](xref:mvc/models/validation#buil jQuery validation isn't supported in Razor components. We recommend any of the following approaches: * Follow the guidance in for either: - * Server-side validation in a Blazor Web App that adopts interactive rendering. + * Server-side validation in a Blazor Web App that adopts an interactive render mode. * Client-side validation in a standalone Blazor Web Assembly app. * Use native HTML validation attributes (see [Client-side form validation (MDN documentation)](https://developer.mozilla.org/docs/Learn/Forms/Form_validation)). * Adopt a third-party validation JavaScript library.