Remove the join_date future-date validation closes #482 #495
3 changed files with 2 additions and 4 deletions
|
|
@ -188,7 +188,6 @@ Settings (1) → MembershipFeeType (0..1)
|
||||||
### Member Constraints
|
### Member Constraints
|
||||||
- First name and last name required (min 1 char)
|
- First name and last name required (min 1 char)
|
||||||
- Email unique, validated format (5-254 chars)
|
- Email unique, validated format (5-254 chars)
|
||||||
- Join date cannot be in future
|
|
||||||
- Exit date must be after join date
|
- Exit date must be after join date
|
||||||
- Phone: `+?[0-9\- ]{6,20}`
|
- Phone: `+?[0-9\- ]{6,20}`
|
||||||
- Postal code: optional (no format validation)
|
- Postal code: optional (no format validation)
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ Table members {
|
||||||
first_name text [null, note: 'Member first name (min length: 1 if present)']
|
first_name text [null, note: 'Member first name (min length: 1 if present)']
|
||||||
last_name text [null, note: 'Member last name (min length: 1 if present)']
|
last_name text [null, note: 'Member last name (min length: 1 if present)']
|
||||||
email text [not null, unique, note: 'Member email address (5-254 chars, validated)']
|
email text [not null, unique, note: 'Member email address (5-254 chars, validated)']
|
||||||
join_date date [null, note: 'Date when member joined club (cannot be in future)']
|
join_date date [null, note: 'Date when member joined club']
|
||||||
exit_date date [null, note: 'Date when member left club (must be after join_date)']
|
exit_date date [null, note: 'Date when member left club (must be after join_date)']
|
||||||
notes text [null, note: 'Additional notes about member']
|
notes text [null, note: 'Additional notes about member']
|
||||||
city text [null, note: 'City of residence']
|
city text [null, note: 'City of residence']
|
||||||
|
|
@ -187,7 +187,6 @@ Table members {
|
||||||
**Validation Rules:**
|
**Validation Rules:**
|
||||||
- first_name, last_name: optional, but if present min 1 character
|
- first_name, last_name: optional, but if present min 1 character
|
||||||
- email: 5-254 characters, valid email format (required)
|
- email: 5-254 characters, valid email format (required)
|
||||||
- join_date: cannot be in future
|
|
||||||
- exit_date: must be after join_date (if both present)
|
- exit_date: must be after join_date (if both present)
|
||||||
- postal_code: optional (no format validation)
|
- postal_code: optional (no format validation)
|
||||||
- country: optional
|
- country: optional
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ defmodule Mv.Membership.Member do
|
||||||
## Validations
|
## Validations
|
||||||
- Required: email (all other fields are optional)
|
- Required: email (all other fields are optional)
|
||||||
- Email format validation (using EctoCommons.EmailValidator)
|
- Email format validation (using EctoCommons.EmailValidator)
|
||||||
- Date validations: join_date not in future, exit_date after join_date
|
- Date validations: exit_date after join_date
|
||||||
- Email uniqueness: prevents conflicts with unlinked users
|
- Email uniqueness: prevents conflicts with unlinked users
|
||||||
- Linked member email change: only admins or the linked user may change a linked member's email (see `Mv.Membership.Member.Validations.EmailChangePermission`)
|
- Linked member email change: only admins or the linked user may change a linked member's email (see `Mv.Membership.Member.Validations.EmailChangePermission`)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue