View definition

class Axlsx::RestrictionValidator

Defined in github.com/randym/axlsx/lib/axlsx/util/validators.rb

Description

class Axlsx::RestrictionValidator

Validate a value against a specific list of allowed values.

Perform validation

Parameters:

  • name (String)

    The name of what is being validatied. This is included in the error message

  • choices (Array)

    The list of choices to validate against

  • v (Any)

    The value to be validated

Raises:

  • (ArgumentError)

    Raised if the value provided is not in the list of choices.

RestrictionValidator is referenced in 0 repositories