Laravel Realtime input
Enjoy realtime input validation by passing your rules in your input itself.
Requirments
This package is tested with Laravel v8 and it should work on Laravel v7 and v9
php | ^7.4|^8.0 |
Composer | ^2.3 |
Laravel | ^8.0 |
Installation
Install the package by using composer:
composer require yemeni-open-source/blade-realtime-input
Basic Usage
<x-realtime-input::strings name="username" rules="required|min:5" />
Advance Usage
You can add id
, class
or type
other HTML attributes to your input like following
<x-realtime-input::strings name="username" rules="required|min:5" :id="'user'" :class="'form-control'" />
You can add array name like following
<x-realtime-input::strings name="username[]" rules="required|min:5" :id="'user'" :class="'form-control'" />
So to add class="form-control"
it should be :class="'form-control'"
Note the colon :
before the attribute and the single quotation "''"
inside the double quotation
Localization
The library works as you familiar with laravel validator you can read laravel validation localization.
License
The MIT License (MIT). Please see MIT license File for more information.