add api to add a validation on export elements

Exports elements should implements "ExportElementValidatedInterface"
This commit is contained in:
2017-02-02 22:32:02 +01:00
parent 43047c5008
commit 5c0ca70ebf
10 changed files with 209 additions and 11 deletions

View File

@@ -0,0 +1,6 @@
services:
chill.main.export_element_validator:
class: Chill\MainBundle\Validator\Constraints\Export\ExportElementConstraintValidator
tags:
- { name: validator.constraint_validator }

View File

@@ -3,4 +3,4 @@
The role "%role%" require to be associated with a scope.: Le rôle "%role%" doit être associé à un cercle.
The role "%role%" should not be associated with a scope.: Le rôle "%role%" ne doit pas être associé à un cercle.
"The password must contains one letter, one capitalized letter, one number and one special character as *[@#$%!,;:+\"'-/{}~=µ()£]). Other characters are allowed.": "Le mot de passe doit contenir une majuscule, une minuscule, et au moins un caractère spécial parmi *[@#$%!,;:+\"'-/{}~=µ()£]). Les autres caractères sont autorisés."
The password fields must match: Les mots de passe doivent correspondre
The password fields must match: Les mots de passe doivent correspondre

View File

@@ -46,9 +46,11 @@
<div data-display-show-hide="{{ filter_form.vars.id }}">
{{ form_widget(filter_form.form) }}
{{ form_errors(filter_form) }}
</div>
</div>
{% endfor %}
{{ form_errors(form.children.export.children.filters) }}
</div>
{% else %}
{# render the children, to mark the widget as 'rendered' #}
@@ -67,6 +69,7 @@
<div data-display-show-hide="{{ aggregator_form.vars.id }}">
{{ form_widget(aggregator_form.form) }}
{{ form_errors(aggregator_form) }}
</div>
</div>
{% endfor %}