示例#1
0
        /// <summary>
        /// Validate the property value.
        /// </summary>
        /// <param name="context">The <see cref="PropertyContext{TEntity, TProperty}"/>.</param>
        public override void Validate(PropertyContext <TEntity, TProperty> context)
        {
            // Exit where nothing to validate.
            if (context.Value == null)
            {
                return;
            }

            // Create the context args.
            var args = context.CreateValidationArgs();

            // Validate and merge.
            context.MergeResult(Validator.Validate(context.Value, args));
        }