Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
devel:documentation:application_configuration:dev:dynamic-forms [2019/05/24 06:54]
tomiskar [Dynamic forms (eav)]
devel:documentation:application_configuration:dev:dynamic-forms [2019/09/25 07:27]
tomiskar
Line 27: Line 27:
   * ''UUID'' - uuid identifier. Indexed.   * ''UUID'' - uuid identifier. Indexed.
   * ''ATTACHMENT'' - attachment (~binary file). Read more about [[#attachments|attachments]].   * ''ATTACHMENT'' - attachment (~binary file). Read more about [[#attachments|attachments]].
 +  * ''CODELIST'' - referenced code list - persists items "code" into short text. Uses face type as code list code.
 +  * ''ENUMERATION'' referenced frontend enumeration - persists items "code" into short text. Uses face type as enumeration name.
  
  
Line 90: Line 92:
 {{tag>validation}} {{tag>validation}}
  
 +For form attribute values is possible to configure prepared validations. Validation are evaluated (**on the backend**), when form with extended attributes is saved and sent to backend. Simple validations as ''required'', ''min'', ''max'' are evaluated on frontend after value is changed.
 +
 +<note important>Validations are suported for single attribute values only for now (feature request [[https://redmine.czechidm.com/issues/1874|#1874]]).</note>
 +
 +=== Required ===
 +
 +Value is required.
 +
 +=== Unique ===
 +
 +Value has to be unique.
 +
 +<note info>Unique validation is not supported for ''BYTEARRAY'' and ''ATTACHMENT'' persistent types.</note>
 +
 +=== Min, Max ===
 +
 +Value has to be greater than (lesser than) or equal given ''min'' (''max'') values. Real number (38,4) can be configured.
 +
 +<note info>Min and max validation is supported for numeric ''DOUBLE'', ''INT'', ''LONG'' persistent types.</note>
  
 ==== Regex ==== ==== Regex ====
Line 104: Line 125:
 </note> </note>
  
 +{{ :devel:documentation:application_configuration:dev:validation.png |}}
  
 ==== Validation message ==== ==== Validation message ====
Line 110: Line 132:
  
 <note tip>Can contain localization key (e.g. ''core:validationError.invalid.unique''). Parameters ''min'', ''max'', ''regex'', ''unique'', ''required'' is available for localization message.</note> <note tip>Can contain localization key (e.g. ''core:validationError.invalid.unique''). Parameters ''min'', ''max'', ''regex'', ''unique'', ''required'' is available for localization message.</note>
 +
  
  
Line 133: Line 156:
   * Attachment renderer: support multiple files, validation support (now is validation on input)   * Attachment renderer: support multiple files, validation support (now is validation on input)
   * Created deep copy, when form values are copied => attachment is linked to two form values and is removed, when the first one is deleted.   * Created deep copy, when form values are copied => attachment is linked to two form values and is removed, when the first one is deleted.
 +  * [[https://redmine.czechidm.com/issues/1874|#1874]]: Support unique validation for multivalued eav attributes
  • by tomiskar