FormFieldValidations

Introduction

FormFieldValidations are related to FormFields and describe how input fields should be validated when a User enters information or submits the Form.

How a field should be validated is determined by it's FormFieldValidationType associated by thw key and the config.

Model Definition

Alias

formFieldValidation

Relations

Computed Properties

  • validation_string - The resulting validation string from the configuration

[Adm.] Create

Create a new FormFieldValidation.

Definition

POST /api/administration/forms/fields/validations

Request Keys

Keys with * are required.

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/forms/fields/validations', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'form_field_id' => 7,
        'form_field_validation_type_id' => 'email'
    ]
]);

Example Response

{
  "status": "success",
  "data": {
    "form_field_id": 7,
    "form_field_validation_type_id": "email",
    "config": {},
    "updated_at": "2019-01-25 14:47:40",
    "created_at": "2019-01-25 14:47:40",
    "id": 5,
    "validation_string": "email",
    "form_field_validation_type": {
      "id": "email",
      "default_config": {},
      "sort_number": 2,
      "created_at": "2019-01-21 00:00:00",
      "updated_at": "2019-01-21 00:00:00"
    }
  }
}

[Adm.] Update

Update an existing FormFieldValidation by id.

Definition

PUT /api/administration/forms/fields/validations/{id}

Request Keys

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/forms/fields/validations/5', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'form_field_id' => 7,
        'form_field_validation_type_id' => 'required'
    ]
]);

Example Response

{
  "status": "success",
  "data": {
    "id": 5,
    "form_field_id": 7,
    "form_field_validation_type_id": "required",
    "config": {},
    "created_at": "2019-01-25 14:47:40",
    "updated_at": "2019-01-25 14:55:21",
    "validation_string": "required",
    "form_field_validation_type": {
      "id": "required",
      "default_config": {},
      "sort_number": 1,
      "created_at": "2019-01-21 00:00:00",
      "updated_at": "2019-01-21 00:00:00"
    }
  }
}

[Adm.] Delete

Delete an existing FormFieldValidation by id.

Definition

DELETE /api/administration/forms/fields/validations/{id}

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/administration/forms/fields/validations/5', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

{
  "status": "success",
  "data": {
    "count": 1
  }
}

Last updated