Skip to content

ObjectValidator

Object validator are used to validate the plan of an object attribute. It will be used into the Validators field of the schema.ObjectAttribute struct.

How to use it

import (
    fobjectvalidator "github.com/orange-cloudavenue/terraform-plugin-framework-validators/objectvalidator"
)

List of Validators

  • RequireIfAttributeIsOneOf - This validator is used to require the attribute if another attribute is one of the given values.
  • RequireIfAttributeIsSet - This validator is used to require the attribute if another attribute is set.
  • NullIfAttributeIsOneOf - This validator is used to verify the attribute value is null if another attribute is one of the given values.
  • NullIfAttributeIsSet - This validator is used to verify the attribute value is null if another attribute is set.

Special

  • Not - This validator is used to negate the result of another validator.