With Laravel Package you can create instance real-time validation for your input in blade.
Muath Alsowadi
Posted on September 4, 2022
Installation
Install the package by using composer:
composer require yemeni-open-source/blade-realtime-input
Basic Usage
The <input>
tag:
<x-realtime-input::strings name="username" rules="required|min:5" />
The <select>
tag:
<x-realtime-input::options
rules="in:usd,yer"
class="btn btn-default custom-select"
name="currency" id="currency"
>
<option value="usd">USD</option>
<option value="yer" selected>YER</option>
<option value="sar">SAR</option>
</x-realtime-input::options>
Advance Usage
You can add id
, class
, type
or other HTML attributes to your input like following
<x-realtime-input::strings
rules="required|min:5"
name="username"
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"
/>
Localization
The library works as you familiar with laravel validator you can read laravel validation localization.
💖 💪 🙅 🚩
Muath Alsowadi
Posted on September 4, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
laravel With Laravel Package you can create instance real-time validation for your input in blade.
September 4, 2022