heimrichhannot/contao-widgetcollection

contao小部件集合。

1.4.1 2018-06-01 08:52 UTC

This package is not auto-updated.

Last update: 2024-09-24 19:54:31 UTC


README

Latest Stable Version Total Downloads

此模块目前仅在单个Contao 3项目中使用,并未进行一般性测试。欢迎反馈。

此模块是一组contao小部件,它们为输入字段添加了一些高级(后端)验证。它们设计用于与Formhybrid模块一起使用。

安装

使用composer

composer require heimrichhannot/contao-widgetcollection

小部件

BIC (Swift) bicWidget

验证BIC/SWIFT-地址。

使用IsoCodes进行验证。

用法

'inputType' => 'bicWidget',

生日 birthdayWidget

验证生日。

用法

'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

验证IBAN号码。

使用IsoCodes进行验证。

用法

'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").
]

电话 phoneWidget

验证电话号码。

使用IsoCodes进行验证。

用法

'inputType' => 'phoneWidget',
'eval' => [
    'countries' => ['DE', 'AT'] // Array with country codes
]

邮政编码 postalWidget

验证邮政编码。

使用IsoCodes进行验证。

用法

'inputType' => 'postalWidget',
'eval'      => [
    'countries' => ['DE', 'AT'] // Array with country codes
]