Project

General

Profile

Actions

Feature #1438

closed

Validators for EAV attributes

Added by Ondřej Kopr over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Validators
Target version:
Start date:
01/09/2019
Due date:
% Done:

100%

Estimated time:
Owner:

Description

For all eavs attributes will be implemented new feature validators.

Now will works these validation:

  • required,
  • regex,
  • min,
  • max,
  • unique.

For validators will works prefly validation.

Validation will be implemented for IdmFormAttribute and overridden attribute in role.

Validators will not works for multivalued attributes.


Related issues

Related to IdStory Identity Manager - Task #1408: Use regular expression as validator in EAVClosedOndřej Kopr12/07/2018

Actions
Related to IdStory Identity Manager - Feature #1874: Support validations for multivalued eav attributesNewRadek Tomiška09/24/2019

Actions
Related to IdStory Identity Manager - Defect #2035: Form attribute type double can be only integer/longClosedRadek Tomiška02/03/2020

Actions
Related to IdStory Identity Manager - Task #1195: Form values - add filters by valueClosedRadek Tomiška07/26/2018

Actions
Actions #1

Updated by Ondřej Kopr about 5 years ago

  • Assignee changed from Ondřej Kopr to Radek Tomiška

Please do it. Probably immediately.

Actions #2

Updated by Ondřej Kopr about 5 years ago

  • Related to Task #1408: Use regular expression as validator in EAV added
Actions #3

Updated by Radek Tomiška about 5 years ago

  • % Done changed from 0 to 30

Basic BE validation are implemented. Validation error sent from BE is rendered as standard FE field validation. Remains implementing all types of validations (required implemented now).

Actions #4

Updated by Radek Tomiška about 5 years ago

  • % Done changed from 30 to 50

Implemented all validation types on BE - min, max, regex, unique.

I'll continue with:
- showing better error message on FE for regular expressions
- prevent to lost filled values, when some validation fails (after request to BE)

Actions #5

Updated by Radek Tomiška about 5 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 50 to 90

Feature is implemented:
- the simple validations - required, min, max - are still evaluated on FE, when value is changed
- regex, unique validations are evaluated after form is saved on BE
- validation can be overriden in role form attributes

Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/596464aeee7484a7667bbb85de783eb5c4b8d1bf

Doc:
https://wiki.czechidm.com/devel/documentation/application_configuration/dev/dynamic-forms#validation

Could you do a feedback, please?

Actions #6

Updated by Vít Švanda about 5 years ago

I did review and everything looks correctly now (I completed copy of validation definitions to role attributes and I created tests for it).

I discovered only one potencial problem: In the case, when user creates two concept-role for same role where unique validation is enabled. In this case, user can create concepts with same value (not unique). Be default it is correct, because unique check should be executed against in the identityRole values. As future improvement could be implemented validation on unique EAV values whitin specific role-request.

Thanks for that.

Changes and tests: https://github.com/bcvsolutions/CzechIdMng/commit/f5551d9a645ef794d3c3371a4fe5e490d5c1352d

Actions #7

Updated by Vít Švanda about 5 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 90 to 100
Actions #8

Updated by Radek Tomiška about 5 years ago

  • Status changed from Resolved to Closed
Actions #9

Updated by Radek Tomiška over 4 years ago

  • Related to Feature #1874: Support validations for multivalued eav attributes added
Actions #10

Updated by Radek Tomiška about 4 years ago

  • Related to Defect #2035: Form attribute type double can be only integer/long added
Actions #11

Updated by Radek Tomiška over 2 years ago

  • Related to Task #1195: Form values - add filters by value added
Actions

Also available in: Atom PDF