Resource map is nothing more than yaml. config/resource_map.yaml is default path to resource map.
You can change it via your application configuration:
# config/packages/fsi_resource_repository.yml
---
fsi_resource_repository:
map_path: %kernel.project_dir%/config/my_map_file_name.yamlExample resource map:
# config/resource_map.yaml
resources:
type: group
home_page:
type: group
header:
type: text
form_options:
label: Page Header
constraints:
NotBlank: ~
Length:
min: 2
max: 50
minMessage: "Your first name must be at least {{ limit }} characters length"
maxMessage: "Your first name cannot be longer than {{ limit }} characters length"
content:
type: textarea
form_options:
label: Page ContentThere are following resource types available in bundle:
Available resource types
textintegernumberdatetimedatetimeboolurlemail- web_file (not available default)
- fsi_ckeditor (deprecated, not available default)
- ckeditor (not available default)
Instruction how to add new resource type
Multiple constraints can be set to each resource type. You can use all Symfony constraints just passing their short name (like NotBlank or Length) or custom one by passing full class name (like FSi\Bundle\DemoBundle\Validator\Constraints\NotBlank)