Perform a custom validation on the texts for any particular element.
Filter Name
This filter's name is actually an array of strings. The first string must always be 'Validate'
, but the last three can change depending on exactly what values you want to validate.
array('Validate', $recordType, $elementSetName, $elementName)
-
$recordType
: The type of Omeka object to validate the metadata for. Most commonly, this will be'Item'
. -
$elementSetName
: The name of the element set containing the metadata field to be validated. Possible values include'Dublin Core'
and'Item Type Metadata'
. -
$elementName
: The name of the specific element within the set to be validated.
For example, the filter name for validating the Dublin Core Title element for Items would be:
array('Validate', 'Item', 'Dublin Core', 'Title')
Parameters
- boolean
$isValid
{{#if - | (optional)}}
- Whether or not the text is currently considered to be valid.
- {{#if: | Default:
{{{default}}}
}} - string
$textValue
{{#if - | (optional)}}
- The element text to be validated.
- {{#if: | Default:
{{{default}}}
}} - Omeka_Record
$record
{{#if - | (optional)}}
- The record that applies to the element text.
- {{#if: | Default:
{{{default}}}
}} - Element
$element
{{#if - | (optional)}}
- The Element record for the element text.
- {{#if: | Default:
{{{default}}}
}}
Return
Implementations of this filter must either return the boolean value true
if the element text is valid, or false
if the text is invalid.