Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heimrichhannot/contao-widgetcollection
A collection of contao widgets.
https://github.com/heimrichhannot/contao-widgetcollection
Last synced: about 1 month ago
JSON representation
A collection of contao widgets.
- Host: GitHub
- URL: https://github.com/heimrichhannot/contao-widgetcollection
- Owner: heimrichhannot
- Created: 2018-01-29T09:53:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-01T08:53:55.000Z (over 6 years ago)
- Last Synced: 2023-08-21T11:17:16.452Z (over 1 year ago)
- Language: PHP
- Size: 20.5 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Contao Widget Collection
[![Latest Stable Version](https://poser.pugx.org/heimrichhannot/contao-widgetcollection/v/stable)](https://packagist.org/packages/heimrichhannot/contao-widgetcollection)
[![Total Downloads](https://poser.pugx.org/heimrichhannot/contao-widgetcollection/downloads)](https://packagist.org/packages/heimrichhannot/contao-widgetcollection)> 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](https://github.com/heimrichhannot/contao-formhybrid) module.
## Install
With composer:
```
composer require heimrichhannot/contao-widgetcollection
```## Widgets
### BIC (Swift) `bicWidget`
Validates a BIC/SWIFT-Adress.
Uses [IsoCodes](https://github.com/ronanguilloux/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](https://github.com/ronanguilloux/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](https://github.com/ronanguilloux/IsoCodes) for validation.
#### Usage
```
'inputType' => 'phoneWidget',
'eval' => [
'countries' => ['DE', 'AT'] // Array with country codes
]
```### Postal code `postalWidget`
Validate a postal code.
Uses [IsoCodes](https://github.com/ronanguilloux/IsoCodes) for validation.
#### Usage
```
'inputType' => 'postalWidget',
'eval' => [
'countries' => ['DE', 'AT'] // Array with country codes
]
```