Exemplo n.º 1
0
        public virtual void Validate(ValidationResult result)
        {
            Bonus.ValidateRequired(result, nameof(Bonus));

            HireDate.ValidateRequired(result, nameof(HireDate));

            Name.ValidateRequired(result, nameof(Name));

            Name.ValidateMaxLength(result, nameof(Name), 50);
        }
        public virtual void Validate(ValidationResult result)
        {
            HireDate.ValidateRequired(result, nameof(HireDate));

            Name.ValidateRequired(result, nameof(Name));

            Name.ValidateMaxLength(result, nameof(Name), 50);

            CellPhone?.Validate(result);

            Spouse?.Validate(result);
        }
        public override void Validate(ValidationResult result)
        {
            base.Validate(result);

            HireDate.ValidateRequired(result, nameof(HireDate));

            CellPhone.Validate(result);

            foreach (var person in Dependants)
            {
                person.Validate(result);
            }
        }