All Projects → sinanbozkus → Formhelper

sinanbozkus / Formhelper

Licence: mit
ASP.NET Core - Transform server-side validations to client-side without writing any javascript code. (Compatible with Fluent Validation)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Formhelper

Awesome-Nuget-Packages
📦 A collection of awesome and top .NET packages sorted by most popular needs.
Stars: ✭ 87 (-43.87%)
Mutual labels:  aspnetcore, netcore, aspnet-core, asp-net-core
awesome-dotnet-async
A curated list of awesome articles and resources to learning and practicing about async, threading, and channels in .Net platform. 😉
Stars: ✭ 84 (-45.81%)
Mutual labels:  aspnetcore, netcore, aspnet-core, asp-net-core
Approvejs
A simple JavaScript validation library that doesn't interfere
Stars: ✭ 336 (+116.77%)
Mutual labels:  validation, validator, form-validation, form
Awesome Microservices Netcore
💎 A collection of awesome training series, articles, videos, books, courses, sample projects, and tools for Microservices in .NET Core
Stars: ✭ 865 (+458.06%)
Mutual labels:  asp-net-core, aspnetcore, aspnet-core
Znetcs.aspnetcore.logging.entityframeworkcore
This is Entity Framework Core logger and logger provider. A small package to allow store logs in any data store using Entity Framework Core.
Stars: ✭ 24 (-84.52%)
Mutual labels:  asp-net-core, aspnetcore, aspnet-core
Grpc Dotnet Validator
Simple request message validator for grpc.aspnet
Stars: ✭ 25 (-83.87%)
Mutual labels:  validation, validator, aspnetcore
Formsy React
A form input builder and validator for React JS
Stars: ✭ 708 (+356.77%)
Mutual labels:  validation, form-validation, form
Usetheform
React library for composing declarative forms, manage their state, handling their validation and much more.
Stars: ✭ 40 (-74.19%)
Mutual labels:  validation, form-validation, form
Ok
✔️ A tiny TypeScript library for form validation
Stars: ✭ 34 (-78.06%)
Mutual labels:  validation, form-validation, form
Elmahcore
ELMAH for Net.Standard and Net.Core
Stars: ✭ 127 (-18.06%)
Mutual labels:  asp-net-core, aspnetcore, netcore
Ngx Dynamic Form Builder
FormBuilder + class-transformer + class-validator = dynamic form group builder for Angular10+
Stars: ✭ 93 (-40%)
Mutual labels:  validation, validator, form
React Final Form
🏁 High performance subscription-based form state management for React
Stars: ✭ 6,781 (+4274.84%)
Mutual labels:  validation, form-validation, form
Bing.netcore
Bing是基于 .net core 2.0 的框架,旨在提升团队的开发输出能力,由常用公共操作类(工具类、帮助类)、分层架构基类,第三方组件封装,第三方业务接口封装等组成。
Stars: ✭ 758 (+389.03%)
Mutual labels:  aspnetcore, aspnet-core, netcore
Form Validation.js
The most customizable validation framework for JavaScript.
Stars: ✭ 127 (-18.06%)
Mutual labels:  validation, form-validation, form
Aspnetcore Developer Roadmap
Roadmap to becoming an ASP.NET Core developer in 2021
Stars: ✭ 8,248 (+5221.29%)
Mutual labels:  asp-net-core, aspnetcore, aspnet-core
Znetcs.aspnetcore.authentication.basic
A simple basic authentication middleware.
Stars: ✭ 40 (-74.19%)
Mutual labels:  asp-net-core, aspnetcore, aspnet-core
Legit
input validation framework
Stars: ✭ 81 (-47.74%)
Mutual labels:  validation, form-validation, form
Gitserver
ASP.NET Core Git HTTP Server
Stars: ✭ 98 (-36.77%)
Mutual labels:  asp-net-core, aspnetcore, netcore
Bootstrap Validate
A simple Form Validation Library for Bootstrap 3 and Bootstrap 4 not depending on jQuery.
Stars: ✭ 112 (-27.74%)
Mutual labels:  validation, form-validation, form
Asp.net Core Template
A ready-to-use template for ASP.NET Core with repositories, services, models mapping, DI and StyleCop warnings fixed.
Stars: ✭ 599 (+286.45%)
Mutual labels:  asp-net-core, aspnetcore, aspnet-core

Form Helper

If you like this library and want to support it, please give a star. ⭐️

Form & Validation Helper for ASP.NET Core

Form Helper helps you to create ajax forms and validations without writing any javascript code. It transforms server-side validations to client-side. You can also use the form validator without ajax.

Compatible with Fluent Validation (You can add client-side validation support to Fluent Validation.)

NuGet Nuget Gitter

FormHelper - Form and Validation Helper for ASP.NET Core | Product Hunt

FormHelper

Installation

FormHelper can be installed using the Nuget Package Manager or the dotnet CLI.

Package Manager:

Install-Package FormHelper

dotnet CLI:

dotnet add package FormHelper

This library works with jQuery

CDN:

<!-- form helper - You don't need to add these files to your project, just add it. it's embeded! -->
<!-- if you dont't want to use these embeded files, you can download the files from dist folder -->
<!-- You can use formhelper.js/css instead of formhelper.min.js/css to debug. -->
<!-- The bundle file includes jQuery validation and jQuery validation unobtrusive -->

<link rel="stylesheet" href="/formhelper/formhelper.min.css" />
<script src="/formhelper/formhelper.bundle.min.js"></script>

Usage

Startup.cs

ConfigureServices:

services.AddControllersWithViews().AddFormHelper();

With configuration: (optional)

services.AddControllersWithViews().AddFormHelper(options => {
    CheckTheFormFieldsMessage = "Your custom message...",
    RedirectDelay = 6000,
    EmbeddedFiles = false
});

Configure:

<!-- If you want to use embeded form helper files, add this line -->
app.UseFormHelper();

ViewImports.cshtml

@using FormHelper
@addTagHelper *, FormHelper

View: (TagHelper)

<form asp-formhelper="true" asp-controller="Home" asp-action="Save">
   // <input...
   // ...
</form>

// You can use <form asp-formhelper="true"> or <formhelper> to activate formhelper.
// Optional parameters:
// asp-callback="javascriptFunctionName", asp-beforeSubmit="javascriptFunctionName", asp-dataType="FormData/Json", asp-enableButtonAfterSuccess="false", asp-resetFormAfterSuccess="true" asp-toastrPosition="ToastrPosition.BottomRight"

Controller:

[FormValidator]
public IActionResult Save(FormViewModel viewModel)

// If you use Json data type, you need to add [FromBody] attribute.
// public IActionResult Save([FromBody]FormViewModel viewModel)

Return a result from Controller:

Error Message:

return FormResult.CreateErrorResult("An error occured.");

Success Message:

return FormResult.CreateSuccessResult("Product saved.");

Success Message with Redirect:

return FormResult.CreateSuccessResult("Product saved. Please wait...", Url.Action("Home", "Index"));

Success Message with Redirect and Delay Time:

return FormResult.CreateSuccessResult("Product saved. Please wait...", Url.Action("Home", "Index"), 10000); // 10 seconds

Fill the form fields from a json object:

$("#formId").fillFormFields(yourJsonObject);

Toastr:

Success:

formHelperToastr.success("Text here");

Warning:

formHelperToastr.warning("Text here");

Information:

formHelperToastr.information("Text here");

Error:

formHelperToastr.error("Text here");
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].