Provides Payload field factories with normalization hooks and React 19 admin components for Persian and Iranian applications. It covers Unicode slugs, Jalali date pickers, integer minor-unit money, and validated Iranian mobile, national code, bank card, Sheba and address fields. An optional plugin normalizes money strings submitted via REST or Local API. Requires Payload 3.85 or later and React 19, and is ESM-only.
Production-grade semantic field factories and Admin integrations for Payload CMS.
Installation
npm i @nexload-sdk/payload-fields3
Stars
0
Forks
0
Open Issues
Today
Last Updated
224
Weekly Downloads
v4.1.0
npm Version
532.6 KB
Unpacked Size
2
Dependencies
3+2 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 3 |
| Dec 4, 2026 | 3 |
| Dec 3, 2026 | 3 |
| Dec 2, 2026 | 3 |
| Dec 1, 2026 | 3 |
| Nov 30, 2026 | 3 |
| Nov 29, 2026 | 3 |
| Nov 28, 2026 | 3 |
| Nov 27, 2026 | 3 |
| Nov 26, 2026 | 3 |
| Nov 25, 2026 | 3 |
| Nov 24, 2026 | 3 |
| Nov 23, 2026 | 3 |
| Nov 22, 2026 | 3 |
| Nov 21, 2026 | 3 |
| Nov 20, 2026 | 3 |
| Nov 19, 2026 | 3 |
| Nov 18, 2026 | 3 |
| Nov 17, 2026 | 2 |
| Nov 16, 2026 | 2 |
| Nov 15, 2026 | 2 |
| Nov 14, 2026 | 2 |
| Nov 13, 2026 | 2 |
| Nov 12, 2026 | 2 |
| Nov 11, 2026 | 2 |
| Nov 10, 2026 | 2 |
| Nov 9, 2026 | 2 |
| Nov 8, 2026 | 2 |
| Nov 7, 2026 | 2 |
| Nov 6, 2026 | 2 |
| Nov 5, 2026 | 2 |
| Nov 4, 2026 | 2 |
| Nov 3, 2026 | 2 |
| Nov 2, 2026 | 2 |
| Nov 1, 2026 | 2 |
| Oct 31, 2026 | 2 |
| Oct 30, 2026 | 2 |
| Oct 29, 2026 | 2 |
| Oct 28, 2026 | 2 |
| Oct 27, 2026 | 2 |
| Oct 26, 2026 | 2 |
| Oct 25, 2026 | 2 |
| Oct 24, 2026 | 2 |
| Oct 23, 2026 | 2 |
| Oct 22, 2026 | 2 |
| Oct 21, 2026 | 2 |
| Oct 20, 2026 | 2 |
| Oct 19, 2026 | 2 |
| Oct 18, 2026 | 2 |
| Oct 17, 2026 | 1 |
| Oct 16, 2026 | 1 |
| Oct 15, 2026 | 1 |
| Oct 14, 2026 | 1 |
| Oct 13, 2026 | 1 |
| Oct 12, 2026 | 1 |
| Oct 11, 2026 | 1 |
| Oct 10, 2026 | 1 |
| Oct 9, 2026 | 1 |
| Oct 8, 2026 | 1 |
| Oct 7, 2026 | 1 |
| Oct 6, 2026 | 1 |
| Oct 5, 2026 | 1 |
| Oct 4, 2026 | 1 |
| Oct 3, 2026 | 1 |
| Oct 2, 2026 | 1 |
| Oct 1, 2026 | 1 |
| Sep 30, 2026 | 1 |
| Sep 29, 2026 | 1 |
| Sep 28, 2026 | 1 |
| Sep 27, 2026 | 1 |
| Sep 26, 2026 | 1 |
| Sep 25, 2026 | 1 |
| Sep 24, 2026 | 1 |
| Sep 23, 2026 | 1 |
| Sep 22, 2026 | 1 |
| Sep 21, 2026 | 1 |
| Sep 20, 2026 | 1 |
| Sep 19, 2026 | 1 |
| Sep 18, 2026 | 1 |
| Sep 17, 2026 | 1 |
| Sep 16, 2026 | 1 |
| Sep 15, 2026 | 1 |
| Sep 14, 2026 | 1 |
| Sep 13, 2026 | 1 |
| Sep 12, 2026 | 1 |
| Sep 11, 2026 | 1 |
| Sep 10, 2026 | 1 |
| Sep 9, 2026 | 1 |
| Sep 8, 2026 | 1 |
| Sep 7, 2026 | 1 |
| Sep 6, 2026 | 1 |
Shared by 8 plugins in gecut/nexload-sdk.
79+50 since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 79 |
| Dec 4, 2026 | 240 |
| Dec 3, 2026 | 238 |
| Dec 2, 2026 | 225 |
| Dec 1, 2026 | 233 |
| Nov 30, 2026 | 226 |
| Nov 29, 2026 | 213 |
| Nov 28, 2026 | 200 |
| Nov 27, 2026 | 14 |
| Nov 26, 2026 | 13 |
| Nov 25, 2026 | 13 |
| Nov 24, 2026 | 3 |
| Nov 23, 2026 | 4 |
| Nov 22, 2026 | 6 |
| Nov 21, 2026 | 7 |
| Nov 20, 2026 | 7 |
| Nov 19, 2026 | 7 |
| Nov 18, 2026 | 23 |
| Nov 17, 2026 | 21 |
| Nov 16, 2026 | 20 |
| Nov 15, 2026 | 19 |
| Nov 14, 2026 | 20 |
| Nov 13, 2026 | 20 |
| Nov 12, 2026 | 22 |
| Nov 11, 2026 | 6 |
| Nov 10, 2026 | 14 |
| Nov 9, 2026 | 16 |
| Nov 8, 2026 | 36 |
| Nov 7, 2026 | 34 |
| Nov 6, 2026 | 34 |
| Nov 5, 2026 | 33 |
| Nov 4, 2026 | 35 |
| Nov 3, 2026 | 26 |
| Nov 2, 2026 | 25 |
| Nov 1, 2026 | 4 |
| Oct 31, 2026 | 18 |
| Oct 30, 2026 | 18 |
| Oct 29, 2026 | 17 |
| Oct 28, 2026 | 15 |
| Oct 27, 2026 | 18 |
| Oct 26, 2026 | 25 |
| Oct 25, 2026 | 26 |
| Oct 24, 2026 | 12 |
| Oct 23, 2026 | 12 |
| Oct 22, 2026 | 13 |
| Oct 21, 2026 | 32 |
| Oct 20, 2026 | 29 |
| Oct 19, 2026 | 21 |
| Oct 18, 2026 | 21 |
| Oct 17, 2026 | 21 |
| Oct 16, 2026 | 22 |
| Oct 15, 2026 | 21 |
| Oct 14, 2026 | 5 |
| Oct 13, 2026 | 5 |
| Oct 12, 2026 | 12 |
| Oct 11, 2026 | 12 |
| Oct 10, 2026 | 24 |
| Oct 9, 2026 | 34 |
| Oct 8, 2026 | 46 |
| Oct 7, 2026 | 43 |
| Oct 6, 2026 | 48 |
| Oct 5, 2026 | 91 |
| Oct 4, 2026 | 120 |
| Oct 3, 2026 | 131 |
| Oct 2, 2026 | 134 |
| Oct 1, 2026 | 129 |
| Sep 30, 2026 | 138 |
| Sep 29, 2026 | 144 |
| Sep 28, 2026 | 99 |
| Sep 27, 2026 | 75 |
| Sep 26, 2026 | 56 |
| Sep 25, 2026 | 44 |
| Sep 24, 2026 | 39 |
| Sep 23, 2026 | 36 |
| Sep 22, 2026 | 27 |
| Sep 21, 2026 | 53 |
| Sep 20, 2026 | 50 |
| Sep 19, 2026 | 49 |
| Sep 18, 2026 | 50 |
| Sep 17, 2026 | 57 |
| Sep 16, 2026 | 67 |
| Sep 15, 2026 | 79 |
| Sep 14, 2026 | 48 |
| Sep 13, 2026 | 45 |
| Sep 12, 2026 | 42 |
| Sep 11, 2026 | 51 |
| Sep 10, 2026 | 44 |
| Sep 9, 2026 | 32 |
| Sep 8, 2026 | 29 |
| Sep 7, 2026 | 29 |
| Sep 6, 2026 | 29 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1086380959-payload-fields)<a href="https://payloaddirectory.dev/plugins/1086380959-payload-fields"><img src="https://payloaddirectory.dev/badge/1086380959-payload-fields.svg" alt="Payload Directory"></a>README
Semantic Payload CMS field factories and Admin UI components for Unicode slugs, Jalali dates, integer money, and Iranian identity fields.
[!IMPORTANT] Version 4.0.0 is pending in
.changeset/: the package is now ESM-only targeting Payload>=3.85.0 <4.0.0(React 19), slugs are unique by default, validation messages adapt tofavs other locales, and./schemaadds@nexload-sdk/payload-schemaintegration.
@nexload-sdk/payload-fields provides production-ready Payload CMS field factories, beforeValidate normalization hooks, and React 19 Admin UI components tailored for Persian and Iranian applications. It solves percent-encoded Unicode slugs, Gregorian-only admin datepickers, floating-point currency rounding, and repeated validation logic for Iranian mobile numbers, national codes, bank cards, Sheba/IBANs, and addresses. It is for Payload 3 teams building Persian or bilingual admin panels.
What it is not:
@nexload-sdk/payload-schema via ./schema for Zod projection).@nexload-sdk/payload-editor).@nexload-sdk/payload-preset).moneyField stores safe integer minor units (IRR, IRT, or a custom { code, label, fractionDigits } currency definition) to eliminate floating-point drift.dayOnly and monthOnly dates store canonical noon (12:00:00) in timeZone (Asia/Tehran by default) so dates do not shift across browser timezones."use client" Admin components live behind ./admin/* subpaths.pnpm add @nexload-sdk/payload-fields
# or
npm install @nexload-sdk/payload-fields
# or
yarn add @nexload-sdk/payload-fields
# or
bun add @nexload-sdk/payload-fields
For optional @nexload-sdk/payload-fields/schema support:
pnpm add @nexload-sdk/payload-schema zod
| Package | Range | Required / Optional |
|---|---|---|
payload | >=3.85.0 <4.0.0 | Required |
@payloadcms/ui | >=3.85.0 <4.0.0 | Required |
react | ^19.0.1 || ^19.1.2 || ^19.2.1 | Required |
react-dom | ^19.0.1 || ^19.1.2 || ^19.2.1 | Required |
@nexload-sdk/payload-schema | >=2.0.0 <4.0.0 | Optional (for ./schema) |
zod | >=4.1.0 <5.0.0 | Optional (for ./schema) |
import {
iranAddressField,
iranMobileField,
jalaliDateField,
jalaliDateRangeField,
moneyField,
nationalCodeField,
payloadFieldsPlugin,
slugField,
} from "@nexload-sdk/payload-fields";
import type { CollectionConfig } from "payload";
export const Customers: CollectionConfig = {
slug: "customers",
fields: [
{ name: "name", type: "text", required: true },
...slugField({ source: "name" }),
jalaliDateField({ name: "birthDate", pickerAppearance: "dayOnly" }),
jalaliDateRangeField({ start: "subscriptionStart", end: "subscriptionEnd" }),
moneyField({ name: "credit", currency: "IRT", minMinorUnits: 0 }),
iranMobileField({ name: "mobile", required: true }),
nationalCodeField({ name: "nationalCode" }),
iranAddressField({ recipient: false }),
],
};
Register payloadFieldsPlugin() in payload.config.ts if clients submit money as formatted strings or use custom slug generators.
| Factory | Stored Type | Canonical Value | Admin Component |
|---|---|---|---|
slugField(options) | text + checkbox | URL-safe Unicode slug ("کتاب", "کتاب-2") | SlugFieldComponent |
jalaliDateField(options) | date | ISO 8601 UTC instant | JalaliDateFieldComponent + JalaliDateCell |
jalaliDateRangeField(options) | row (startsAt, endsAt) | Two ISO 8601 instants (endsAt >= startsAt) | JalaliDateFieldComponent + JalaliDateCell |
withJalaliTimestamps(fields, options) | adds virtual text fields | Virtual createdAtJalali / updatedAtJalali | Standard read-only input |
moneyField(options) | number | Safe integer minor units | MoneyFieldComponent + MoneyCell |
iranMobileField(options) | text | 09XXXXXXXXX (default) or +989XXXXXXXXX with storage: "e164" | ValidatedTextFieldComponent + FormattedCell |
iranLandlineField(options) | text | 0XXXXXXXXXX | ValidatedTextFieldComponent + FormattedCell |
nationalCodeField(options) | text | 10-digit national code with checksum validation | ValidatedTextFieldComponent + FormattedCell |
legalIdField(options) | text | 11-digit legal entity ID with checksum validation | ValidatedTextFieldComponent + FormattedCell |
postalCodeField(options) | text | 10-digit postal code | ValidatedTextFieldComponent + FormattedCell |
bankCardField(options) | text | 16-digit Luhn-checked card | ValidatedTextFieldComponent + FormattedCell |
shebaField(options) | text | 26-char IBAN (IR...) with ISO 7064 validation | ValidatedTextFieldComponent + FormattedCell |
ltrTextField(options) | text | Raw text with nexload-ltr class and optional monospace styling | Standard LTR text input |
sortOrderField(options) | number | Non-negative integer (default 0) | Sidebar number input |
iranAddressField(options) | group | Province, city, line, postalCode, recipient | Native group with 31 provinces |
searchKeyField(options) | text | Normalized Persian search key (toSearchIndexText of sources) | Hidden, read-only, indexed |
@nexload-sdk/payload-fields/schema)Use schemaFields to define entities with @nexload-sdk/payload-schema and derive both Payload fields and Zod schemas:
import { defineEntity } from "@nexload-sdk/payload-schema";
import { schemaFields } from "@nexload-sdk/payload-fields/schema";
export const customerEntity = defineEntity({
name: "Customer",
fields: {
mobile: schemaFields.iranMobile(),
nationalCode: schemaFields.nationalCode(),
price: schemaFields.money({ currency: "IRT" }),
birthDate: schemaFields.jalaliDate({ nullable: true }),
...schemaFields.slug({ source: "name" }),
},
});
searchKeyField)searchKeyField({ name, sources, localized? }) creates a hidden, read-only, indexed text field whose beforeChange hook computes toSearchIndexText from the configured sources (reading siblingData when the source key is present — so explicit null clears it — and falling back to previousSiblingDoc when absent so partial updates keep the key, while overwriting any client-supplied value). Because it resolves against siblingData / previousSiblingDoc (falling back to originalDoc only at the top level), it works at the top level or inside a group, array, named tab, or block.
import { toSearchQuery } from "@nexload-sdk/persian/text";
import { searchKeyField } from "@nexload-sdk/payload-fields/search";
// Collection config
fields: [
{ name: "title", type: "text" },
{ name: "sku", type: "text" },
searchKeyField({ name: "searchKey", sources: ["title", "sku"] }),
];
// Querying with Payload Local API
const q = toSearchQuery(userInput);
if (q) {
where.and.push({ searchKey: { like: q } });
}
[!NOTE] Limitations:
- Localization: When
localized: trueis set onsearchKeyField, a change to a non-localized source field refreshes the search key only for the request locale. Keep allsourceslocalized, or re-save each locale when a non-localized source changes.- Sibling
beforeChangehooks: Payload runs sibling fieldbeforeChangehooks concurrently, sosearchKeyFieldreads each source's incoming value, not the value after that source's ownbeforeChangehook. The key is normalized bytoSearchIndexText(letters, digits, diacritics, whitespace), so trimming or Persian normalization in the source does not matter; any other transform of a source must run inbeforeValidateso the key sees the final value.
pg_trgm + GIN migrationPayload index: true creates a B-tree index, which does not accelerate %word% substring ILIKE queries. In PostgreSQL, add a pg_trgm GIN index in a Payload migration (Payload runs migrations inside a transaction, so do not use CONCURRENTLY inside a migration):
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE INDEX IF NOT EXISTS products_search_key_trgm_idx
ON products USING gin (search_key gin_trgm_ops);
For large tables in production, create the index with CREATE INDEX CONCURRENTLY IF NOT EXISTS ... via psql outside Payload migrations to avoid blocking writes.
searchKeyField(...) and run migrations so new writes populate searchKey.payload.find + payload.update with depth: 0) so the beforeChange hook computes keys without locking the table.searchKey, then switch search reads to query searchKey.[!NOTE] SQLite caveat:
toSearchQueryescapes\,%, and_with\. PostgreSQL uses\as its defaultLIKE/ILIKEescape character, so wildcards match literally. SQLite has no defaultESCAPEcharacter, so the literal-wildcard guarantee is Postgres-only. On SQLite, a query containing%,_or\will not match when escaped, so SQLite users passtoSearchQuery(userInput, { escape: false })(accepting that those characters then act as wildcards).
| Subpath | Key exports | Summary |
|---|---|---|
@nexload-sdk/payload-fields | All field factories, withJalaliTimestamps, payloadFieldsPlugin, PAYLOAD_FIELDS_PLUGIN_ORDER, IRR, IRT, resolveCurrency, parseMoneyToMinorUnits, formatMoney, formatJalaliDate, toStoredJalaliInstant, and option types | Main server/config entry |
@nexload-sdk/payload-fields/slug | slugField, formatSlug, SlugFieldOptions, SlugFieldResult | Standalone slug factory & formatter |
@nexload-sdk/payload-fields/search | searchKeyField, SearchKeyFieldOptions | Hidden indexed Persian search key field |
@nexload-sdk/payload-fields/date | jalaliDateField, jalaliDateRangeField, withJalaliTimestamps, toStoredJalaliInstant, formatJalaliDate | Standalone Jalali date utilities |
@nexload-sdk/payload-fields/money | moneyField, IRR, IRT, resolveCurrency, parseMoneyToMinorUnits, formatMoney | Standalone money field & helpers |
@nexload-sdk/payload-fields/schema | schemaFields | @nexload-sdk/payload-schema adapter |
@nexload-sdk/payload-fields/admin/slug-field | SlugFieldComponent | Admin slug field UI |
@nexload-sdk/payload-fields/admin/jalali-date-field | JalaliDateFieldComponent | Admin Jalali datepicker UI |
@nexload-sdk/payload-fields/admin/jalali-date-cell | JalaliDateCell | List cell for Jalali dates |
@nexload-sdk/payload-fields/admin/money-field | MoneyFieldComponent | Admin formatted money input |
@nexload-sdk/payload-fields/admin/money-cell | MoneyCell | List cell for money values |
@nexload-sdk/payload-fields/admin/validated-text-field | ValidatedTextFieldComponent | Admin input for Iranian text fields |
@nexload-sdk/payload-fields/admin/formatted-cell | FormattedCell | List cell for Iranian text fields |
payloadFieldsPlugin(options) accepts:
| Option | Type | Default | Description |
|---|---|---|---|
slugGenerators | Record<string, SlugGenerator> | undefined | Named async slug generators invoked by the plugin's slug endpoint |
generateSlugAccess | SlugGenerationAccess | undefined | Access predicate { req } => boolean | Promise<boolean> for slug generation |
The plugin sets slug: "nexload-fields" and order: 900 (PAYLOAD_FIELDS_PLUGIN_ORDER).
type: "module").payloadFieldsPlugin run in Node.js / Payload config. Admin components under ./admin/* are React 19 "use client" components.payload and @payloadcms/ui >=3.85.0 <4.0.0 with React 19.req.i18n.language / useTranslation() (fa* receives Persian; all other locales receive English).[!CAUTION]
payloadFieldsPlugin()is required when money values are submitted via REST or Local API as strings (such as"۱۲۳٬۴۵۶"or"123456"). Payload core runsparseFloat()on number fields before field hooks run, which strips or corrupts Persian digits and separators; the plugin'sbeforeOperationhook normalizes strings to safe integers first. Plain numeric values work without the plugin. The hook is registered on collections and globals and normalizes money fields in blocks referenced by slug fromconfig.blocks.
[!WARNING]
slugFieldis unique by default (unique: true), but automatic collision suffixing (-2,-3) only runs for top-level slug fields. For slugs nested inside arrays, groups, or named tabs, passunique: false(otherwise database unique errors apply instead of suffixes).
[!NOTE]
iranAddressFieldandjalaliDateRangeFieldare not included in@nexload-sdk/payload-fields/schemain 4.0. Also, the plugin only sees collections and globals that exist when it runs. If another plugin withorder >= 900adds money fields, place it beforepayloadFieldsPlugin()when it uses order 900, or give it an order below 900.
payload / @payloadcms/ui >=3.85.0 <4.0.0 and React 19.packages/refactoring/payload-fields to packages/payload-fields.unique: false.dayOnly and monthOnly dates store canonical noon in timeZone (Asia/Tehran by default).fa admin locales now receive English validation messages instead of Persian.payloadFieldsPlugin() if clients send money as strings.pnpm payload generate:importmap after upgrading to refresh Admin component paths../schemapayloadFieldsPlugin()This package ships agent skills that match its version. After install they are at node_modules/@nexload-sdk/payload-fields/skills/:
payload-fields-core — skills/payload-fields-core/SKILL.mdpayload-fields-iranian-fields — skills/payload-fields-iranian-fields/SKILL.mdpayload-fields-jalali-date — skills/payload-fields-jalali-date/SKILL.mdpayload-fields-money — skills/payload-fields-money/SKILL.mdpayload-fields-slug — skills/payload-fields-slug/SKILL.mdPoint your coding agent at them from AGENTS.md, or install from the repository with npx skills add gecut/nexload-sdk --skill <name>.
MIT
payload better fields plugin
Improved admin panel fields for slugs, numbers, patterns, ranges, colours, phones, alerts and dates
554.2k/wk294v3
payload phone number plugin
Phone number field with country selection, as-you-type formatting and validation in the Payload admin
69837/wk17v3
payload mask plugin
Input masking for Payload text fields using IMask
359/wk17v1 v2
payload plugin phone field
Phone number field for Payload with country selection and built-in validation helpers
017/wk12v1
payload plugin json form builder
Edit a Payload json field as real admin fields, with the form shape built in the admin panel
72441/wk37v3
payload icon picker
Icon picker field for Payload v4 that stores the icon name and raw SVG, with dropdown or drawer modes
7027/wk0v4