Blog Detail

10

Aug
Laravel Realtime Input Validation by Passing Rules in Input cover image

arrow_back Laravel Realtime Input Validation by Passing Rules in Input

With the Laravel Realtime Input package, you can enjoy real-time input validation by passing your rules in your input itself.

Requirements

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

You can install this 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 rules="required|min:5" name="username" :id="'user'"
                        :class="'form-control'" />

You can add array names 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.

Closing Notes

If you are a business and want to utilize Laravel for your next PHP-based web application, CRM Software, E-commerce application, SAAS application, or any custom web application development for your bespoke requirements, you must discover an impeccable team with experience in the Laravel framework. So Codebrisk is here to help you with your tailored requirements regarding Laravel Development. Please feel free to send us an email at rizwan@codebrisk.com or get in touch with us, our business person will get back to you.

Published at : 10-08-2022

Author : Rizwan Aslam
AUTHOR
Rizwan Aslam

I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.

Launch your project

Launch project