### Function

# GObject param_value_validate

since: 2.0

#### Declaration

    gboolean
    g_param_value_validate (
      GParamSpec* pspec,
      GValue* value
    )

#### Description

Ensures that the contents of `value` comply with the specifications set out by `pspec`. For example, a `GParamSpecInt` might require that integers stored in `value` may not be smaller than -42 and not be greater than +42. If `value` contains an integer outside of this range, it is modified accordingly, so the resulting value will fit into the range -42 .. +42.

Available since: 2.0

#### Parameters

`pspec`

  Type: `GParamSpec`

  A valid `GParamSpec`.

  The data is owned by the caller of the function.

`value`

  Type: `GValue`

  A `GValue` of correct type for `pspec`.

  The data is owned by the caller of the function.

#### Return value

Type: `gboolean`

Whether modifying `value` was necessary to ensure validity.