heimrichhannot / contao-widgetcollection
A collection of contao widgets.
Installs: 65
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Type:contao-module
Requires
- php: ~5.6 || ~7.0
- contao-community-alliance/composer-plugin: ~2.4 || ~3.0
- contao/core-bundle: ^3.5.1 || ~4.1
- heimrichhannot/contao-formhybrid: >=2.0 <4.0-dev
- ronanguilloux/isocodes: ~2.0
This package is not auto-updated.
Last update: 2024-11-19 20:26:47 UTC
README
This module is currently only used in a single Contao 3 project and not generally tested. Feedback is welcome.
This module is a collection of contao widgets that add some advanced (backend) validation to the input fields. They are designed to use with Formhybrid module.
Install
With composer:
composer require heimrichhannot/contao-widgetcollection
Widgets
BIC (Swift) bicWidget
Validates a BIC/SWIFT-Adress.
Uses IsoCodes for validation.
Usage
'inputType' => 'bicWidget',
Birthday birthdayWidget
Validates a birthday.
Usage
'inputType' => 'birthdayWidget',
'eval' => [
'minAge' => 18, // Set a min age. Set 0 to disable
'maxAge' => 0, // Set a max age. Set 0 to disable
'format' => 'd.m.Y' // The format of the input date
]
IBAN ibanWidget
Validates an IBAN number.
Uses IsoCodes for validation.
Usage
'inputType' => 'ibanWidget',
'eval' => [
'fields' => 22, // Number of input fields. Default is 22.
'prefill' => '' // A optional prefilled value, for example to set the typical country (example: "DE").
]
Phone phoneWidget
Validates a phone number.
Uses IsoCodes for validation.
Usage
'inputType' => 'phoneWidget',
'eval' => [
'countries' => ['DE', 'AT'] // Array with country codes
]
Postal code postalWidget
Validate a postal code.
Uses IsoCodes for validation.
Usage
'inputType' => 'postalWidget',
'eval' => [
'countries' => ['DE', 'AT'] // Array with country codes
]