netapp_ontap.validations API documentation
Description: Copyright &copy; 2020 NetApp Inc. All rights reserved …

# Module `netapp_ontap.validations`

Copyright © 2020 NetApp Inc. All rights reserved.

This module holds validation functions that can be used for field level validation

## Functions

`def enum_validation(choices: typing.List) -> typing.Callable`

  Verifies that the provided value is one of the possible choices

  ## Args

  `choices`
    The list of choices

  ## Returns

  A callable function which validates its input value as being part of the set of choices.

`def integer_validation(minimum: int = None, maximum: int = None) -> typing.Callable`

  Verify that the given value is within the acceptable range

  ## Args

  `minimum`
    The minimum value the integer can be
  `maximum`
    The maximum value the integer can be

  ## Returns

  A callable function which validates its inputs as being between minimum and maximum.

`def len_validation(minimum: int = 0, maximum: int = None) -> typing.Callable`

  Verify the given string is within the acceptable length limits

  ## Args

  `minimum`
    The minimum length the string can be
  `maximum`
    The maximum length the string can be. If unset, maximum is not checked.

  ## Returns

  A callable function which validates its input as being between minimum and maximum.