Skip to content

Commit 3bfff21

Browse files
committed
2 parents 75aba01 + 43920a8 commit 3bfff21

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

README.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ services.AddFormHelper(new FormHelperConfiguration
6363
```
6464
Configure:
6565
```
66-
<!-- If you use embeded form helper script files, add this line -->
66+
<!-- If you want to use embeded form helper script file, add this line -->
6767
app.UseFormHelper();
6868
```
6969

@@ -86,24 +86,6 @@ app.UseFormHelper();
8686
// asp-callback="...", asp-beforeSubmit="...", asp-dataType="FormData/Json", asp-enableButtonAfterSuccess="False"
8787
```
8888

89-
90-
**View: (HtmlHelper)**
91-
```csharp
92-
var formConfig = new FormConfig(ViewContext)
93-
{
94-
FormId = "ProductForm",
95-
FormTitle = "New Product",
96-
BeforeSubmit = "ProductFormBeforeSubmit", // optional
97-
Callback = "ProductFormCallback" // optional,
98-
99-
};
100-
101-
// <form id="@formConfig.FormId" asp-controller="Home" asp-action="Save">
102-
// ...
103-
104-
@await Html.RenderFormScript(formConfig)
105-
```
106-
10789
**Controller:**
10890
```csharp
10991
[HttpPost, FormValidator]
@@ -119,14 +101,6 @@ Error Message:
119101
```
120102
return FormResult.CreateErrorResult("An error occured.");
121103
```
122-
Warning Message:
123-
```
124-
return FormResult.CreateWarningResult("'ABC' is already exist in the database.");
125-
```
126-
Info Message:
127-
```
128-
return FormResult.CreateInfoResult("Happy new year!");
129-
```
130104
Success Message:
131105
```
132106
return FormResult.CreateSuccessResult("Product saved.");
@@ -139,10 +113,3 @@ Success Message with Redirect and Delay Time:
139113
```
140114
return FormResult.CreateSuccessResult("Product saved. Please wait...", Url.Action("Home", "Index"), 10000); // 10 seconds
141115
```
142-
143-
## Blog Posts
144-
>**English:**<br>
145-
>English Posts are not ready yet. But you can look the samples. It's so easy to use.
146-
>
147-
>**Turkish:**<br>
148-
>[FormHelper ve Fluent Validation kullanarak ASP.NET Core Validation İşlemleri](http://www.sinanbozkus.com/form-helper-ve-fluent-validation-kullanarak-asp-net-core-validation-islemleri/)

0 commit comments

Comments
 (0)