• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

proengsoft/laravel-jsvalidation: Laravel Javascript Validation

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

proengsoft/laravel-jsvalidation

开源软件地址(OpenSource Url):

https://github.com/proengsoft/laravel-jsvalidation

开源编程语言(OpenSource Language):

PHP 68.6%

开源软件介绍(OpenSource Introduction):

Laravel Javascript Validation

Latest Version tests Code Coverage Total Downloads License

Laravel Javascript Validation package allows to reuse your Laravel Validation Rules, Messages, FormRequest and Validators to validate forms automatically in client side without need to write any Javascript code or use HTML Builder Class.

You can validate forms automatically referencing it to your defined validations. The messages are loaded from your validations and translated according your Localization preferences.

Supported versions

Laravel 6.x - 8.x

Feature overview

Supported Rules

Almost all Validation Rules provided by Laravel and other packages are supported.

Almost are validated in client-side using Javascript, but in some cases, the validation should to be done in server-side via AJAX:

Unsupported Rules

Some Laravel validations are not implemented yet.

Getting started

The easiest way to create Javascript validations is using Laravel Form Request Validation.

Installation

Follow the Installation Guide to install the package. The default config should work out-of-box

Validating Form Request

Call JsValidator Facade in your view to validate any FormRequest

<form>
    <!-- ... My form stuff ... -->
</form>

<!-- Javascript Requirements -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>

<!-- Laravel Javascript Validation -->
<script type="text/javascript" src="{{ asset('vendor/jsvalidation/js/jsvalidation.js')}}"></script>

{!! JsValidator::formRequest('App\Http\Requests\MyFormRequest') !!}

Take a look to Basic Usage or Examples to get more information.

Documentation

To get more info refer to Project Wiki

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

Laravel Javascript Validation contributors list

License

The MIT License (MIT). Please see License File for more information.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap