---
title: "iOS PDF form validations using JavaScript | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/ios/forms/javascript-validation/"
md_url: "https://www.nutrient.io/guides/ios/forms/javascript-validation.md"
last_updated: "2026-05-21T11:22:21.609Z"
description: "Learn to implement PDF form validations in iOS using JavaScript with Nutrient SDK. Explore supported formatting APIs for numbers, dates, and ranges."
---

# Validating PDF forms using JavaScript on iOS

Nutrient has some support for executing JavaScript attached to a document, annotations, or forms. For more general information about Nutrient’s JavaScript support, see our [PDF JavaScript support](https://www.nutrient.io/guides/ios/features/javascript.md) guide.

Most form validation scripts should work out of the box, but we’re constantly working on improving the engine and increasing our coverage of the PDF specification’s support for JavaScript.

## Supported formatting API

The following functions for form formatting and validation are supported by Nutrient. See Adobe’s documentation to learn more about them.

### Number formatting

- `AFNumber_Format`, `AFNumber_Keystroke`, `AFMakeNumber`

### Percent formatting

- `AFPercent_Format`, `AFPercent_Keystroke`

### Date formatting

- `AFDate_Format`, `AFDate_FormatEx`, `AFDate_Keystroke`, `AFDate_KeystrokeEx`, `AFTime_Format`, `AFTime_FormatEx`, `AFTime_Keystroke`

### Special formatting

- `AFSpecial_Format`, `AFSpecial_Keystroke`, `AFSpecial_KeystrokeEx`

### Simple formatting

- `AFSimple`, `AFSimple_Calculate`

### Range validation

- `AFRange_Validate`
---

## Related pages

- [Extract data from PDF form fields on iOS](/guides/ios/forms/extract-form-data.md)
- [PDF form library for iOS](/guides/ios/forms.md)
- [Flatten PDF form fields on iOS](/guides/ios/forms/flatten.md)
- [Exploring PDF form actions on iOS devices](/guides/ios/forms/pdf-actions-support.md)

