WIP: member property validation closes #49 #71

Closed
moritz wants to merge 3 commits from validation into main
Owner

The validation of different custom types like email or phone works. But I couldn't yet get the required field option working. It should lookup if property_type.required is true for a specific property.value and check if the value is empty or not. But as property.value is an Ash.Type.Union it contains a map with the actual value and the type of the value. So just checking if property.value is empty is not enough, it needs a custom validation function to check for property.value[:value]. But inside a validation function I can't load the relation property_type.

The validation of different custom types like `email` or `phone` works. But I couldn't yet get the `required` field option working. It should lookup if `property_type.required` is true for a specific `property.value` and check if the value is empty or not. But as `property.value` is an `Ash.Type.Union` it contains a map with the actual `value` and the `type` of the value. So just checking if `property.value` is empty is not enough, it needs a custom validation function to check for `property.value[:value]`. But inside a validation function I can't load the relation `property_type`.
moritz added this to the Ich kann einen neuen Kontakt anlegen. milestone 2025-06-03 10:33:49 +02:00
moritz added 3 commits 2025-06-03 10:33:50 +02:00
moritz added this to the Sprint 3 - 28.05 - 09.07 project 2025-06-03 10:33:51 +02:00
requested reviews from simon, carla, rafael 2025-06-03 10:35:09 +02:00
moritz self-assigned this 2025-06-03 10:35:13 +02:00
Author
Owner

Closes this as it is replaced by #81
But keeping this branch if we want to work on required custom fields.

Closes this as it is replaced by https://git.local-it.org/local-it/mitgliederverwaltung/pulls/81 But keeping this branch if we want to work on required custom fields.
moritz closed this pull request 2025-06-18 23:42:04 +02:00
Some checks failed
continuous-integration/drone/push Build is failing

Pull request closed

Sign in to join this conversation.
No description provided.