@@ -519,7 +519,7 @@ class SenderFieldset extends Fieldset implements InputFilterProviderInterface
519
519
),
520
520
'validators' => array(
521
521
array(
522
- 'name' => 'Zend\Validator\StringLength',
522
+ 'name' => 'Zend\Validator\StringLength',
523
523
'options' => array(
524
524
'min' => 3,
525
525
'max' => 256
@@ -560,15 +560,15 @@ that in action.
560
560
561
561
When you ` bind() ` an object to the form, the following happens:
562
562
563
- - The composed ` Hydrator ` calls ` extract() ` on the object, and uses the values returned, if any, to
563
+ * The composed ` Hydrator ` calls ` extract() ` on the object, and uses the values returned, if any, to
564
564
populate the ` value ` attributes of all elements. If a form contains a fieldset that itself contains
565
565
another fieldset, the form will recursively extract the values.
566
- - When ` isValid() ` is called, if ` setData() ` has not been previously set, the form uses the composed
566
+ * When ` isValid() ` is called, if ` setData() ` has not been previously set, the form uses the composed
567
567
` Hydrator ` to extract values from the object, and uses those during validation.
568
- - If ` isValid() ` is successful (and the ` bindOnValidate ` flag is enabled, which is true by default),
568
+ * If ` isValid() ` is successful (and the ` bindOnValidate ` flag is enabled, which is true by default),
569
569
then the ` Hydrator ` will be passed the validated values to use to hydrate the bound object. (If you
570
570
do not want this behavior, call ` setBindOnValidate(FormInterface::BIND_MANUAL) ` ).
571
- - If the object implements ` Zend\InputFilter\InputFilterAwareInterface ` , the input filter it
571
+ * If the object implements ` Zend\InputFilter\InputFilterAwareInterface ` , the input filter it
572
572
composes will be used instead of the one composed on the form.
573
573
574
574
This is easier to understand in practice.
@@ -856,45 +856,45 @@ have a central place to define all of these?
856
856
Annotations allow us to solve this problem. You can define the following behaviors with the shipped
857
857
annotations in ` Zend\Form ` :
858
858
859
- - * AllowEmpty* : mark an input as allowing an empty value. This annotation does not require a value.
860
- - * Attributes* : specify the form, fieldset, or element attributes. This annotation requires an
859
+ * * AllowEmpty* : mark an input as allowing an empty value. This annotation does not require a value.
860
+ * * Attributes* : specify the form, fieldset, or element attributes. This annotation requires an
861
861
associative array of values, in a JSON object format:
862
862
` @Attributes({"class":"zend_form","type":"text"}) ` .
863
- - * ComposedObject* : specify another object with annotations to parse. Typically, this is used if a
863
+ * * ComposedObject* : specify another object with annotations to parse. Typically, this is used if a
864
864
property references another object, which will then be added to your form as an additional fieldset.
865
865
Expects a string value indicating the class for the object being composed
866
866
` @ComposedObject("Namespace\Model\ComposedObject") ` or an array to compose a collection:
867
867
`@ComposedObject({ "target_object":"Namespace\Model\ComposedCollection", "is_collection":"true",
868
868
"options":{"count":2}})` ` target_object` is the element to compose, ` is_collection` flags this as a
869
869
collection and ` options ` can take an array of options to pass into the collection.
870
- - * ErrorMessage* : specify the error message to return for an element in the case of a failed
870
+ * * ErrorMessage* : specify the error message to return for an element in the case of a failed
871
871
validation. Expects a string value.
872
- - * Exclude* : mark a property to exclude from the form or fieldset. This annotation does not require
872
+ * * Exclude* : mark a property to exclude from the form or fieldset. This annotation does not require
873
873
a value.
874
- - * Filter* : provide a specification for a filter to use on a given element. Expects an associative
874
+ * * Filter* : provide a specification for a filter to use on a given element. Expects an associative
875
875
array of values, with a "name" key pointing to a string filter name, and an "options" key pointing
876
876
to an associative array of filter options for the constructor: `@Filter({"name": "Boolean",
877
877
"options": {"casting": true }})`. This annotation may be specified multiple times.
878
- - * Flags* : flags to pass to the fieldset or form composing an element or fieldset; these are usually
878
+ * * Flags* : flags to pass to the fieldset or form composing an element or fieldset; these are usually
879
879
used to specify the name or priority. The annotation expects an associative array:
880
880
` @Flags({"priority": 100}) ` .
881
- - * Hydrator* : specify the hydrator class to use for this given form or fieldset. A string value is
881
+ * * Hydrator* : specify the hydrator class to use for this given form or fieldset. A string value is
882
882
expected.
883
- - * InputFilter* : specify the input filter class to use for this given form or fieldset. A string
883
+ * * InputFilter* : specify the input filter class to use for this given form or fieldset. A string
884
884
value is expected.
885
- - * Input* : specify the input class to use for this given element. A string value is expected.
886
- - * Instance* : specify an object class instance to bind to the form or fieldset.
887
- - * Name* : specify the name of the current element, fieldset, or form. A string value is expected.
888
- - * Object* : specify an object class instance to bind to the form or fieldset. (Note: this is
885
+ * * Input* : specify the input class to use for this given element. A string value is expected.
886
+ * * Instance* : specify an object class instance to bind to the form or fieldset.
887
+ * * Name* : specify the name of the current element, fieldset, or form. A string value is expected.
888
+ * * Object* : specify an object class instance to bind to the form or fieldset. (Note: this is
889
889
deprecated in 2.4.0; use * Instance* instead.)
890
- - * Options* : options to pass to the fieldset or form that are used to inform behavior -- things that
890
+ * * Options* : options to pass to the fieldset or form that are used to inform behavior -- things that
891
891
are not attributes; e.g. labels, CAPTCHA adapters, etc. The annotation expects an associative array:
892
892
` @Options({"label": "Username:"}) ` .
893
- - * Required* : indicate whether an element is required. A boolean value is expected. By default, all
893
+ * * Required* : indicate whether an element is required. A boolean value is expected. By default, all
894
894
elements are required, so this annotation is mainly present to allow disabling a requirement.
895
- - * Type* : indicate the class to use for the current element, fieldset, or form. A string value is
895
+ * * Type* : indicate the class to use for the current element, fieldset, or form. A string value is
896
896
expected.
897
- - * Validator* : provide a specification for a validator to use on a given element. Expects an
897
+ * * Validator* : provide a specification for a validator to use on a given element. Expects an
898
898
associative array of values, with a "name" key pointing to a string validator name, and an "options"
899
899
key pointing to an associative array of validator options for the constructor: `@Validator({"name":
900
900
"StringLength", "options": {"min":3, "max": 25}})`. This annotation may be specified multiple times.
0 commit comments