---
url: "https://vueda.dev/v3/reference/api/js/use/validation/useFieldValidation/functions/useFieldValidation.md"
title: "useFieldValidation"
---

# useFieldValidation

## Overview

Dispatches to the validation composable matching the given type string.
Does nothing when type is undefined or unrecognized.

## Signature

`useFieldValidation(type, fieldContext, options)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-type">type</span> | `string` | yes | The validation type (e.g. "text", "numeric", "decimal", "date", "datetime", "time"). |
| <span id="param-fieldContext">fieldContext</span> | [FieldContext](/v3/reference/api/js/use/useField/types/FieldContext.md) | yes | The field context to validate against. |
| <span id="param-options">options</span> | `any` | yes | Constraint configuration (typically the component props object). |

### Returns

`void`

## Source

`client/lib/use/validation/useFieldValidation.js:31`
