---
title: "PDF form validation using JavaScript on Android"
canonical_url: "https://www.nutrient.io/guides/android/forms/javascript-validation/"
md_url: "https://www.nutrient.io/guides/android/forms/javascript-validation.md"
last_updated: "2026-05-22T14:49:21.563Z"
description: "Learn how to validate and format PDF forms on Android using JavaScript with PSPDFKit's powerful features and supported APIs."
---

# Validate PDF forms on Android with JavaScript

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/android/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

- [Easy steps to extract PDF form data on Android](/guides/android/forms/extract-form-data.md)
- [Flatten PDF form fields on Android](/guides/android/forms/flatten.md)
- [PDF form library for Android](/guides/android/forms.md)
- [Explore flexible PDF form actions on Android](/guides/android/forms/pdf-actions-support.md)

