Download the PHP package innoweb/silverstripe-form-validation without Composer

On this page you can find all versions of the php package innoweb/silverstripe-form-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 silverstripe-form-validation

Bouncer.js Form Validation

Version

Introduction

Adds automatic form validation for frontend forms using the Bouncer.js library. This replaces the default HTML5 field validation to improve and unify the layout of error messages accross browsers.

This doesn't replace backend form validation. Backend validation should still be done using the default SS validator (e.g. RequiredFields).

It leaves UserForms forms alone as they are too heavily dependant on jQuery.

Requirements

Note: this version is compatible with Silverstripe 5. For Silverstripe 4, please see the 1 release line.

Installation

Install the module using composer:

Then run dev/build.

Configuration

No configuration required. By default, all frontend forms are being validated based on their HTML5 properties.

Disable validation

If you want to exclude a form from validation, you can disable it in code:

This add the class js-no-validation to the form tag.

To skip validation for specific buttons, you can add the class skip-validation to the button.

Disable form submission

To disable the default form submission, you can disable it in code:

This adds the class js-disable-submit to the form tag.

This is useful if you want to submit the form via AJAX. To submit the form, you can listen to the bouncerFormValid event in JavaScript:

Add Custom Validators

You can inject custom JavaScript validators for certain fields. To do so, you need to extend FormField as follows:

Use the addCustomValidatorScripts extension hook to inject your JavaScript validator:

In your field-validation.js you need to add your validator definition to the global bouncerValidators variable:

License

BSD 3-Clause License, see License


All versions of silverstripe-form-validation with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ^5
silverstripe/vendor-plugin Version ^2
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 innoweb/silverstripe-form-validation contains the following files

Loading the files please wait ....