Search Results for

    Show / Hide Table of Contents

    Method Validate

    | Improve this Doc View Source

    Validate()

    Validates whether the required keys are present in the application.

    Declaration
    public void Validate()
    Implements
    IEnvValidator.Validate()
    Exceptions
    Type Condition
    InvalidOperationException

    The required keys are not specified with the SetRequiredKeys method.

    RequiredKeysNotPresentException

    If the required keys are not present in the application. This exception is not thrown if the IgnoreException() method is invoked.

    | Improve this Doc View Source

    Validate(out EnvValidationResult)

    Validates whether the required keys are present in the application.

    Declaration
    public void Validate(out EnvValidationResult result)
    Parameters
    Type Name Description
    EnvValidationResult result

    The result contains the errors found by the validator.

    Implements
    IEnvValidator.Validate(out EnvValidationResult)
    Exceptions
    Type Condition
    InvalidOperationException

    The required keys are not specified with the SetRequiredKeys method.

    RequiredKeysNotPresentException

    If the required keys are not present in the application. This exception is not thrown if the IgnoreException() method is invoked.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright ©2021 DotEnv.Core