Download the PHP package rohit-raj-verma/pimcore-validation-bundle without Composer

On this page you can find all versions of the php package rohit-raj-verma/pimcore-validation-bundle. 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 pimcore-validation-bundle

PimcoreValidationBundle

A Pimcore bundle that adds complex field validation rules directly in the class definition editor. Define validation constraints like alpha, alphanumeric, numeric, email, phone, regex patterns, length limits, and numeric ranges per field. Validation is enforced when saving data objects.

Features

Requirements

Installation

Step 1: Install via Composer

Step 2: Enable the Bundle

Add the bundle to your config/bundles.php:

Step 3: Install the Bundle (Create Database Table)

This creates the pimcore_validation_field_rules table to store validation configurations.

Step 4: Clear Cache

Usage

Adding Validation Rules to a Field

  1. Navigate to Settings > Data Objects > Classes in Pimcore admin
  2. Open your class definition (e.g., Product)
  3. Select a field in the class tree (e.g., sku, email, price)
  4. In the field settings panel, locate the Validation fieldset
  5. Configure the validation options:
    • Enable validation: Turn validation on/off for this field
    • Required: Make the field mandatory
    • Format: Select the validation type
    • Error message: Custom message shown when validation fails
  6. Save the class definition

Validation Format Options

Format Description Additional Options
None No validation -
Alpha Letters only (a-z, A-Z, spaces) -
Alphanumeric Letters and numbers only -
Numeric Numeric values only -
Email Valid email format -
Phone Valid phone number format -
Regex Custom regex pattern Regex pattern (without delimiters)
Length Character length limits Min length, Max length
Range Numeric value limits Min value, Max value

Examples

SKU Field - Alphanumeric Only

Email Field - Email Validation

Price Field - Numeric Range

Product Code - Regex Pattern

Description Field - Length Limits

How It Works

  1. Class Definition Save: When you save a class definition, the bundle intercepts the request and extracts validation configurations for each field, storing them in the pimcore_validation_field_rules database table.

  2. Object Save: When a data object is saved, the bundle listens to the PRE_UPDATE_VALIDATION_EXCEPTION event, retrieves the validation rules for the object's class, and validates each field value against its configured rules.

  3. Validation Failure: If validation fails, a ValidationException is thrown with the error message, and the field is marked invalid in the UI with inline error display.

Database Table

The bundle creates a table pimcore_validation_field_rules with the following structure:

Column Type Description
id INT Primary key
classId VARCHAR(64) Pimcore class ID
fieldName VARCHAR(190) Field name
config TEXT JSON-encoded validation configuration
modificationDate INT Last modification timestamp

Uninstallation

To remove the bundle and its database table:

Translations

The bundle includes English translations. To add additional languages, create translation files in translations/admin.{locale}.yml:

License

This bundle is released under the MIT License.


All versions of pimcore-validation-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
pimcore/pimcore Version ^11.0
pimcore/admin-ui-classic-bundle Version ^1.0
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 rohit-raj-verma/pimcore-validation-bundle contains the following files

Loading the files please wait ...