Download the PHP package mousav1/validify without Composer
On this page you can find all versions of the php package mousav1/validify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mousav1/validify
More information about mousav1/validify
Files in mousav1/validify
Package validify
Short Description Validify is a powerful PHP validation library that provides flexible and customizable validation rules, error handling, and pre-validation callbacks.
License MIT
Informations about the package validify
Validify
Table of Contents
- Validify
- Table of Contents
- Introduction
- Features
- Installation
- Quick Start
- Basic Validation
- Fluent Validation
- Advanced Usage
- Custom Validation Rules
- Conditional Validation
- Date and Time Validation
- Date Format
- After and Before Rules
- Custom Error Messages
- Field Aliases
- Pre-Validation Callbacks
- Available Rules
- Contributing
- Steps to Contribute:
- License
Introduction
Validify is a lightweight and extensible PHP validation library that simplifies validating user inputs. Whether you're building an API, a form, or any application requiring data validation, Validify provides a powerful and intuitive way to handle it.
Features
- Simple API: Easy-to-use API for defining and executing validation rules.
- Extensible: Define custom validation rules to fit specific use cases.
- Pre-Validation Callbacks: Execute custom logic before validation.
- Conditional Validation: Dynamically apply rules based on conditions.
- Nested Data Support: Validate complex data structures using dot notation.
- Comprehensive Built-in Rules: Includes a wide range of predefined validation rules.
Installation
To install the package, use Composer:
Quick Start
Basic Validation
Here is an example of simple validation using Validify:
Fluent Validation
Define validation rules using a fluent interface for better readability:
Advanced Usage
Custom Validation Rules
Extend Validify with your own custom rules:
Conditional Validation
Apply rules dynamically based on conditions:
Date and Time Validation
Validate date and time fields using predefined rules:
Date Format
After and Before Rules
Custom Error Messages
Define custom error messages for specific rules:
Field Aliases
Use aliases for more readable error messages:
Pre-Validation Callbacks
Execute logic before validation starts:
Available Rules
- required
- min
- max
- numeric
- confirmed
- url
- in
- between
- regex
- alpha
- optional
- required_with
- array
- integer
- boolean
- not_in
- uppercase
- lowercase
- json
- date_format
- after
- before
Contributing
Contributions are welcome! Feel free to submit a pull request or open an issue.
Steps to Contribute:
- Fork the repository.
- Create a new branch for your feature/bugfix.
- Write clear and descriptive commit messages.
- Submit a pull request with detailed explanation.
License
This package is licensed under the MIT License. See the LICENSE file for more details.