Commit Graph

30 Commits (6bee26e95cd6f8d3fdeed7f6ca85c035474918b9)

Author SHA1 Message Date
Kirk Larkin 9065b2ed8f
Add MVC example for ModelState.IsValid (#24909) 2022-02-07 08:19:32 -10:00
Kirk Larkin 2fb542406d
Update Model Validation to 6.0 (#24850)
* Update Model Validation to 6.0

* Suppress POCO NRT warnings
2022-02-02 09:39:15 -10:00
Kirk Larkin 6ba2ba7710
Prepare Model Validation for 6.0 (#24833) 2022-02-01 12:28:24 +00:00
Rick Anderson 95582be7d1
Fix validation sample /4 (#22953) 2021-08-04 11:14:31 -07:00
Rick Anderson 89c93638a7
Update validation.md patch1 (#22239)
* Update validation.md

* Update Create.cshtml.cs

* Update Create.cshtml.cs

* Update aspnetcore/mvc/models/validation.md

* Apply suggestions from code review

Co-authored-by: Pranav K <prkrishn@hotmail.com>

Co-authored-by: Pranav K <prkrishn@hotmail.com>
2021-06-18 08:33:18 -07:00
Kirk Larkin 52fb8d4cef Update Validation for 3.0. (#15663)
* Versioned folders for samples in prep for 3.0.

* dotnet new webapp --no-https

* Cleanup and simplification of templated code/files.

* Movies (using EF Core InMemory).

* ClassicMovieAttribute (custom validation + client-side).

* Configuration + how to disable.

* Complete 3.0 Sample.

* Quick sweep of the docs page.

* Update validation.md
2019-11-19 07:22:52 -10:00
Marcel 98b7a1625d Update CustomValidationAttributeAdapterProvider.cs - Use is an… (#15409)
Use is & cast operator of C# 7
2019-10-31 09:44:01 -05:00
Kirk Larkin 74de68cff0 Demo RemoteAttribute.AdditionalFields in Validation sample. (#14932) 2019-10-08 12:52:58 -10:00
Olcay Bayram 009471e34b Fix in AdditionalFields property sample (#14732)
The AdditionalFields property of the [Remote] attribute is for the other fields that you want to relate but in the sample code the field is referring to it self as an additional field.
2019-10-03 10:44:27 -10:00
Natalie Akam 12c71c9f3b Fix nameof arguments in User model (#13216) 2019-07-10 14:56:12 -06:00
Ponant a818ee5a21 Disable Client Validation in Razor Pages (#12060)
* Disable Client Validation for Razor Pages

https://github.com/aspnet/AspNetCore/issues/7576

* Startup3.cs

To disable client validation in razor pages
2019-04-19 07:21:38 -07:00
Tom Dykstra 48a9e7c392
Validation article updates (#11282)
* implement dougbu feedback + multiple issues
2019-04-01 11:06:27 -07:00
Rick Anderson fad53dba86
show IValidatableObject (#10927)
Fixes #10923
2019-02-13 09:57:29 -10:00
Luke Latham 69306c43f9 Model Validation: Top-level nodes (#10390)
Fixes #10264
[Review URL](https://review.docs.microsoft.com/en-us/aspnet/core/mvc/models/validation?view=aspnetcore-2.2&branch=pr-en-us-10390)

* Not too keen on "top-level node." It isn't documented anywhere, and Google Fu wasn't much help either. I've *guessed* from the API what it means (and I could be *wrong*).
* Side note: `Required` is *required* as a model property attribute to get client-side required validation to work AFAICT. Adding `Required` or `BindRequired` to the top-level node (parameter) doesn't make it work client-side. Not sure if that's an issue or not ... just a side behavior that I noticed when testing.
* `jQuery.validate()` doesn't seem to be a thing any longer. JS complains that it can't find the function with the most recent jQuery validation scripts (from the current templates). Everything seems to work without it, so I nixed it.
* The sample was *almost* updated for 2.2. This should take it across the finish line. 🏁
* In the OP, the dev said that they were missing `AddDataAnnotations`, but we don't doc that level of detail. If they go `AddMvcCore`, they're kind'a on their own to make sure that they have all of the bits in place.
2019-01-16 16:29:24 -10:00
Scott Addie 8caa93e2fb
Restore missing Model State code snippet (#10199) 2019-01-04 10:28:27 -06:00
Henrik Røn 25603327e6 ASP.NET Core MVC: Updating validation sample to 2.2 (#10021) 2018-12-17 07:56:36 -06:00
Luke Latham 5704de168e Implicit versioning of the All package (#9223)
Fixes #9219 

@JunTaoLuo Dan calls out the implicit versioning "for 2.1 SDK or later;" however, we don't usually version the doc content by SDK release. We might need to say something for this update in the passage that I'm adding to the All topic (*aspnetcore/fundamentals/metapackage.md*) about which SDK version this applies to. I don't know if that's something that you would like to do or what version to call out.

I also remove the version from the samples. We also assume that devs are using the latest SDK with our samples.
2018-10-25 15:16:50 -10:00
Luke Latham 46f41d4774
Update All and App package versions (#8513) 2018-09-13 11:39:23 -05:00
Luke Latham 1a0f79a8fe
Update All/App package version (#8489) 2018-09-11 08:53:03 -05:00
John Osborne c2be9e481a Paramater naming convention fix (#8023)
The parameter should be camelCase.
2018-08-10 09:25:53 -05:00
Scott Addie 27e907f3ba
Remove unnecessary jQuery document.ready call (#7899)
Fixes https://github.com/aspnet/Docs/issues/7894

Also incorporated a few Acrolinx suggestions while I was in there.

[Internal Review Page](https://review.docs.microsoft.com/en-us/aspnet/core/mvc/models/validation?view=aspnetcore-2.1&branch=pr-en-us-7899#iclientmodelvalidator)
2018-07-31 11:57:38 -05:00
user135711 1584a58c9b Change jquery onready to IIFE (#6094)
* Changed unobtrusive call from onready to IIFE

* Convert to shorthand document.ready function
2018-04-30 14:16:38 -05:00
MelnikovIG e07a9ad2c8 Fix ValidationSample project compilation (#6050) 2018-04-22 19:35:50 -10:00
Dan Vicarel e2a7f0b335 Added References to jQuery Validate Plugins in the Model Validation Topic (#4751)
* Added more details on remote validation to the MVC model validation page

* Described the attribute -> tag helper -> jquery unobtrusive validation -> jquery validate flow for client-side validation in a little more detail.
2017-11-20 15:35:28 -05:00
Dan Vicarel 29c81f521c Added Description for AdditionalFields Property of Remote Attribute (#4768)
* Updated model validation topic and example code to describe the Remote attribute AdditionalFields property

* Update validation.md
2017-11-10 14:16:20 -10:00
Luke Latham 11d5aacbda Add Required note to model validation topic
Fixes #1928
2017-09-22 21:29:11 -05:00
Luke Latham b7b64803d5 Remove OutputType from project files (#4163)
Removing \<OutputType> from updated 2.0 projects, as it's specified by
Sdk.Web, and we're (generally) not showing defaults in the files.

There's a chance that we'll need to make an additional  update for
*wwwroot* to match the templates. I'm checking on that now.
2017-08-31 15:47:33 -05:00
Luke Latham 5d641ee2cb Update ValidationSample app (#4146)
Fixes #1950

* Upgrades sample to 2.0 with minor fixes
* No significant changes made to the topic
2017-08-30 08:40:35 -07:00
Scott Addie 43ef7d7cf4 Remove double quotes used in addTagHelper directives (#3600) 2017-06-30 01:27:25 +00:00
Daniel Roth e9c1419175 Add docfx content 2016-10-28 10:35:15 -07:00