Accept future join dates: remove past-only validation and update tests
This commit is contained in:
parent
d549e6878c
commit
fb59ef99c1
2 changed files with 34 additions and 8 deletions
|
|
@ -473,11 +473,6 @@ defmodule Mv.Membership.Member do
|
|||
end
|
||||
end
|
||||
|
||||
# Join date not in future
|
||||
validate compare(:join_date, less_than_or_equal_to: &Date.utc_today/0),
|
||||
where: [present(:join_date)],
|
||||
message: "cannot be in the future"
|
||||
|
||||
# Exit date not before join date
|
||||
validate compare(:exit_date, greater_than: :join_date),
|
||||
where: [present([:join_date, :exit_date])],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue