Skip to content

Commit 009471e

Browse files
olcayRick Anderson
authored andcommitted
Fix in AdditionalFields property sample (dotnet#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.
1 parent 346eb31 commit 009471e

File tree

1 file changed

+2
-2
lines changed
  • aspnetcore/mvc/models/validation/sample/Models

1 file changed

+2
-2
lines changed

aspnetcore/mvc/models/validation/sample/Models/User.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ public class User
1010
#endregion
1111

1212
#region snippet_UserNameProperties
13-
[Remote(action: "VerifyName", controller: "Users", AdditionalFields = nameof(FirstName))]
14-
public string FirstName { get; set; }
1513
[Remote(action: "VerifyName", controller: "Users", AdditionalFields = nameof(LastName))]
14+
public string FirstName { get; set; }
15+
[Remote(action: "VerifyName", controller: "Users", AdditionalFields = nameof(FirstName))]
1616
public string LastName { get; set; }
1717
#endregion
1818

0 commit comments

Comments
 (0)