class Fieldmanager_Util_Validation (View source)

Framework for user-facing data validation.

Methods

static object
instance(array $form_id, string $context)

Singleton helper.

add_field(Fieldmanager_Field $fm)

Check if a field has validation enabled and if so add it.

add_validation()

Output the Javascript required for validation, if any fields require it.

Details

static object instance(array $form_id, string $context)

Singleton helper.

Parameters

array $form_id

The form ID.

string $context

The context.

Return Value

object

The singleton instance.

add_field(Fieldmanager_Field $fm)

Check if a field has validation enabled and if so add it.

Parameters

Fieldmanager_Field $fm

The field passed by reference.

add_validation()

Output the Javascript required for validation, if any fields require it.