# Field Types & Configuration

Each field (column) in an Ondeva table defines the type of data it stores, the validation rules it follows, and how it's presented in both backend and frontend contexts.

Below is a reference of all supported field types and their configuration options.

## Shared Properties

Most field types include:

* **Field Name** (Label): Required for all fields.
* **Identifying Column** toggle: Used for display in dropdowns/reference pickers.
* **Required**: User must provide this field in forms.
* **Default Value**: Applied to new entries unless overwritten.

## Core Field Types

### **Text**

* Single-line input for strings.
* Options: default value
* Validation: regex, length, uniqueness.

### **Number**

* Integer-only numeric input.
* Options: default value
* Validation: min, max, uniqueness, regex, formula-based.

### **Float Number**

* Allows decimal numbers (e.g. 3.14, 19.99).
* Options: default value
* Same validations as Number.

### **Rich Text**

* Formatted text (HTML-friendly).
* Used for long content fields, email templates, etc.
* Same validations as Text

### **Date**

* Stores a date (with optional time).
* Options: Include time toggle, Default date picker

### **Checkbox**

* Boolean value (true/false).
* Options: Default checked state

***

## Select Field Types

### **Dropdown**

* Single select from predefined options.
* Options: Choices list, Default selection

### **Multiple Choice**

* Multi-select dropdown (returns array).
* Same options as Dropdown.

***

## File & Media Fields

### **File**

* Upload and store a single file.
* Option: Max file size, File type restrictions

### **File Manager**

* Stores multiple files (advanced component).
* No direct backend data entry (used via front-end components).
* Same options as File

***

## Reference Fields

### **Table Reference**

* Points to another table's entry (foreign key).
* Options: Default referenced entry, Restrict selectable entries

### **Page Reference**

* Stores a reference to an internal page in your app (useful for redirections).

### **Roles**

* Reference one or more roles to this entry.
* Used for permissioning or UI personalization.

***

## Location & Geo Fields

### **Location**

* Stores geolocation metadata:
  * Address
  * Latitude / Longitude
  * Region
  * Country
* Validations: action, regex, formula, unique

### **GeoJSON**

* For storing geo boundaries, polygons, zones.
* No additional config

***

## Advanced Types

### **Password**

* Write-only field, encrypted.

{% hint style="danger" %}
The content of this field is encrypted not hashed. DON'T use this field for sensitive passwords. A possible use case can be temporary tokens.
{% endhint %}

### **Business ID**

* Auto-incrementing, uneditable ID.
* Used for internal tracking or display.
* No configuration options.

***

## Field-Level Validation

Ondeva supports multiple validation types:

* **Required**\
  User must provide a value before saving.
* **Default Value**\
  Auto-fills this value on new entries.
* **Maximum / Minimum**\
  For numbers or string lengths.
* **Regex (Regular Expressions)**\
  Pattern matching for input (e.g., emails, postal codes).
* **Unique (global or per user)**\
  Ensures no duplicates in this column.
* **Formula-Based Validation**\
  Define logic expressions that must evaluate true.
* **Action-Based Validation**\
  Delegate validation to a separate workflow or script for complex checks.
