...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
use eZ\Publish\Core\FieldType\Float\Type; $contentTypeService = $repository->getContentTypeService(); $floatFieldCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct( "float", "ezfloat" ); // Accept only numbers between 0.1 and 203.99 $floatFieldCreateStruct->validatorConfiguration = array( "FileSizeValidator" => array( "minFloatValue" => 0.1, "maxFloatValue" => 203.99 ) ); |
...