internal ValidationMappingsRegistry RegisterValidation <TModel>(Func <IModelValidator <TModel> > factory)
            {
                if (_built)
                {
                    throw new InvalidOperationException(
                              $"{nameof(ValidationMappingsRegistry)} cannot register validations after build.");
                }

                _validators.AddMapping(factory);

                return(this);
            }