Built in Format implementations - adamwojs/formatted-textline GitHub Wiki
This package provides two default implementations of AdamWojs\IbexaFormattedTextLineBundle\FieldType\FormattedTextLine\Format
interface which could be used by your field type:
NullFormat
It's accept all given data.
services:
# ...
app.field_type.custom_text_line.format:
class: AdamWojs\IbexaFormattedTextLineBundle\FieldType\FormattedTextLine\Format\NullFormat
PatternFormat
Accepts values matching regular expression passed as the first argument of the constructor
services:
# ...
app.field_type.custom_text_line.format:
class: AdamWojs\IbexaFormattedTextLineBundle\FieldType\FormattedTextLine\Format\PatternFormat
arguments:
$pattern: '/^[0-9]{2}-[0-9]{3}$/'
$mask: '00-000'
$examples: ['31-123', '40-079']