petshop-05-checks.spp
petshop/membership/petshop-05-checks.spp
Download original file · Petstore source contents
1domain petshop;23atomic check checkProfileAgreementInput(ProfileAgreement) {4require(profileAgreement.newName != BLANK, RejectionCode.NAME_REQUIRED);5require(profileAgreement.newEmail != BLANK, RejectionCode.EMAIL_REQUIRED);6require(profileAgreement.newAddress != BLANK, RejectionCode.ADDRESS_REQUIRED);7require(8profileAgreement.newTier == MemberTier.NORMAL || profileAgreement.newTier == MemberTier.VIP,9RejectionCode.INVALID_MEMBER_TIER10);11}