check uniqueness

Former-commit-id: 4181541ae2
This commit is contained in:
Roman Volosovskyi 2016-06-22 16:32:05 +03:00
parent fe33e694b7
commit cbb56e499c
1 changed files with 2 additions and 2 deletions

View File

@ -8,8 +8,8 @@
(not (realm/exists? :contacts :whisper-identity identity)))
(s/def ::unique-identity unique-identity?)
(s/def ::name (s/and ::not-empty-string ::unique-identity))
(s/def ::whisper-identity ::not-empty-string)
(s/def ::name ::not-empty-string)
(s/def ::whisper-identity (s/and ::not-empty-string ::unique-identity))
(s/def ::contact (s/keys :req-un [::name ::whisper-identity]
:opt-un [::phone ::photo-path ::address]))