Example #1
0
        public async Task <bool> Validate()
        {
            if (LegislationType != Constants.LegislationTypeCCLA && LegislationType != Constants.LegislationTypeCSA)
            {
                return(false);
            }

            if (Details == null)
            {
                return(false);
            }

            if (!await Details.Validate(LegislationType.Value))
            {
                return(false);
            }

            if (Complainant != null && !Complainant.Validate(LegislationType.Value))
            {
                return(false);
            }

            if (Complainant == null && LegislationType == Constants.LegislationTypeCSA)
            {
                return(false);
            }

            return(true);
        }
Example #2
0
 public void Sanitize()
 {
     Details?.Sanitize();
     Complainant?.Sanitize();
 }