Download the PHP package mrpunyapal/laravel-client-validation without Composer

On this page you can find all versions of the php package mrpunyapal/laravel-client-validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-client-validation

Laravel Client Validation

Latest Version on Packagist Total Downloads

A powerful validation package that brings Laravel validation rules to the client-side. Validate forms in real-time using the same rules you know from Laravel — works with any backend or as a standalone NPM package.

Features

Quick Start

Option A: Laravel Package (Composer)

Laravel Boost

If your Laravel project uses Laravel Boost, this package ships a third-party Boost skill for package-aware code generation and debugging.

Install Boost if needed:

If Boost is already installed in the app, refresh package-provided skills after adding or updating this package:

When skills are enabled, Boost can install the laravel-client-validation-development skill and guide AI agents toward the package's recommended Blade, Alpine, Livewire, Filament, and remote-validation patterns.

Option B: Standalone NPM Package

Import only what you need:

Option C: CDN / Script Tag


Usage with Alpine.js

Simple Field Validation

Complete Form Component

Available Methods in validation() Component

Method Description
validate('field') Validate a single field
validateAll() Validate all fields
submit(callback) Validate then call callback if valid
error('field') Get first error for field
hasError('field') Check if field has errors
hasErrors() Check if any errors exist
isValid() Check if form is valid
clearError('field') Clear errors for field
reset() Reset form to initial state

Usage with Livewire

Supports both Livewire v3 and v4. Version is detected automatically.

Using the x-wire-validate Directive

Using the PHP Trait

In your Blade view:

Livewire Events


Usage with Filament

Register the Plugin

Add Validation to Fields

Use the HasClientValidation trait on your custom Filament fields:

Or use the pre-built ClientValidatedField:


Usage with Vanilla JS (No Framework)

Using Data Attributes

Programmatic Validation

Using Blade Directives


Using with FormRequest

In Controller

In Blade


Backend-Agnostic Remote Validation

The RemoteValidator works with any backend, not just Laravel. Configure it for your stack:

Express.js / Node

Django

Custom Adapter


Validation Rules

Client-Side Rules (104 — Instant)

Core: required, nullable, filled, present, bail

String: string, email, url, active_url, alpha, alpha:ascii, alpha_num, alpha_num:ascii, alpha_dash, alpha_dash:ascii, regex, not_regex, contains, doesnt_contain, lowercase, uppercase, starts_with, ends_with, doesnt_start_with, doesnt_end_with, ascii, uuid, uuid:version, ulid, json, hex_color

Numeric: numeric, numeric:strict, integer, integer:strict, decimal, multiple_of, digits, digits_between, min_digits, max_digits

Size: min, max, between, size

Comparison: confirmed, confirmed:field, same, different, gt, gte, lt, lte, in, not_in, enum

Date: date, after, before, after_or_equal, before_or_equal, date_equals, date_format, timezone

Conditional: required_if, required_unless, required_with, required_without, required_with_all, required_without_all, required_if_accepted, required_if_declined, required_array_keys

Presence / Missing: present_if, present_unless, present_with, present_with_all, missing, missing_if, missing_unless, missing_with, missing_with_all

Prohibition: prohibited, prohibited_if, prohibited_unless, prohibited_if_accepted, prohibited_if_declined, prohibits

Boolean: boolean, boolean:strict, accepted, accepted_if, declined, declined_if

Network: ip, ipv4, ipv6, mac_address

Array: array, distinct, in_array, in_array_keys, list

File: file, image, mimes, mimetypes, extensions, dimensions

Advanced: any_of, password_strength

Remote Rules (5 — AJAX)

unique, exists, password, current_password, encoding

See docs/md/validation-rules.md for the canonical validation rules guide and examples.


Configuration

Key options:


Validation Hooks


Custom Rules

Client-Side

Server-Side (PHP)


NPM Subpath Exports

Import Path Contents
laravel-client-validation Full bundle (all adapters)
laravel-client-validation/core LaravelValidator, RuleRegistry, RemoteValidator, EventEmitter
laravel-client-validation/alpine Alpine.js x-validate directive
laravel-client-validation/vanilla Vanilla JS data-validate form validator
laravel-client-validation/livewire Livewire adapter
laravel-client-validation/react React hook adapter
laravel-client-validation/vue Vue composable adapter

Examples

See the examples/ directory for complete demos:


Testing


License

The MIT License (MIT). See License File for more information.


All versions of laravel-client-validation with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^12.0|^13.0
illuminate/validation Version ^12.0|^13.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mrpunyapal/laravel-client-validation contains the following files

Loading the files please wait ...