Workflow action
Validation & formatting
ut_validate
Validate IBAN, BIC, cards, emails, phones, postcodes and national IDs with check digits; format and parse numbers, money and phone numbers by locale.
About
What it does
Validation & formatting checks identifiers before they reach your finance, HR or CRM systems. It validates IBANs (country length and mod-97 check digits), BIC / SWIFT codes, payment card numbers (Luhn and issuer), email syntax, phone numbers (normalised to E.164 with a default country), postcodes for 26 countries and 13 national ID and tax number schemes such as the US SSN, UK National Insurance number, NZ IRD and NHI numbers, German Steuer-ID, French NIR and Indian Aadhaar. Each result has a valid flag, the normalised value to store and a plain-language reason when it fails; Validate many checks a whole form in one step.
The formatting side shows numbers the way each audience reads them: grouping and decimals per locale, percentages, compact numbers and currencies with their usual decimals, symbols or codes, and accounting brackets for negatives. Parse number reads amounts typed in any locale ("1.234,56 €" in German is 1234.56) and Format phone writes numbers as E.164, international or national. All checks run in the sandbox with no network access; they prove a value is well-formed, not that an account exists.
Good for
- Check a supplier's IBAN, BIC and tax number before creating them in the ERP
- Normalise customer phone numbers to E.164 for SMS and CRM sync
- Show amounts in the customer's currency and locale in emails and documents
After installing
- Install the package: the action appears in Extensibility → Workflow actions and in the workflow designer's palette under Custom actions.
- Drag Validation & formatting onto a workflow after a form or API step, choose Validate (or Validate many for several fields) and map the values.
- Branch on {{check_valid}} or {{check_all_valid}} with a Branch by Condition step, and store {{check_normalized}} instead of the typed value.
- Try the included "Supplier bank details check (sample)" workflow from the API or its start form: it validates an IBAN, BIC, email and phone and formats the first payment amount.
Examples
Real inputs, real outputs
Each example ran in the sandbox when this gallery was built; the outputs are exactly what the step returns.
UK IBAN validate
Inputs
{
"type": "iban",
"value": "GB82 WEST 1234 5698 7654 32"
}Outputs
{
"valid": true,
"normalized": "GB82WEST12345698765432",
"reason": "",
"details": {
"country": "GB",
"check_digits": "82",
"bban": "WEST12345698765432",
"formatted": "GB82 WEST 1234 5698 7654 32"
}
}Card number with issuer validate
Inputs
{
"type": "card",
"value": "4111 1111 1111 1111"
}Outputs
{
"valid": true,
"normalized": "4111111111111111",
"reason": "",
"details": {
"issuer": "visa",
"length": 16,
"last4": "1111",
"masked": "************1111"
}
}Onboarding form fields validate_many
Inputs
{
"items": [
{
"name": "Email",
"type": "email",
"value": "ap@example.co.nz"
},
{
"name": "Bank",
"type": "iban",
"value": "DE89 3704 0044 0532 0130 00"
},
{
"name": "Phone",
"type": "phone",
"value": "021 123 4567",
"country": "NZ"
},
{
"name": "Postcode",
"type": "postcode",
"value": "sw1a1aa",
"country": "GB"
}
]
}Outputs
{
"results": [
{
"name": "Email",
"type": "email",
"value": "ap@example.co.nz",
"valid": true,
"normalized": "ap@example.co.nz",
"reason": ""
},
{
"name": "Bank",
"type": "iban",
"value": "DE89 3704 0044 0532 0130 00",
"valid": true,
"normalized": "DE89370400440532013000",
"reason": ""
},
{
"name": "Phone",
"type": "phone",
"value": "021 123 4567",
"valid": true,
"normalized": "+64211234567",
"reason": ""
},
{
"name": "Postcode",
"type": "postcode",
"value": "sw1a1aa",
"valid": true,
"normalized": "SW1A 1AA",
"reason": ""
}
],
"all_valid": true,
"valid_count": 4,
"invalid_count": 0
}German amount to a number parse_number
Inputs
{
"text": "1.234,56 €",
"locale": "de-DE"
}Outputs
{
"value": 1234.56,
"valid": true,
"decimal_separator": ",",
"group_separator": "."
}Yen without decimals format_currency
Inputs
{
"value": 1234567.8,
"currency": "JPY",
"locale": "ja-JP"
}Outputs
{
"formatted": "¥1,234,568",
"currency": "JPY"
}Reference
Functions, inputs and outputs
The designer generates each function's input panel from these declarations; outputs appear in the data picker with their types.
Validate validate
Check one value: iban, bic, card, email, phone, postcode or national_id. Returns valid, the normalised value, the reason it is invalid and type-specific details (card issuer, IBAN country, phone country code, formatted ID, …).
Inputs
typechoice · required · iban / bic / card / email / phone / postcode / … — What the value is.valuestring · required — The value to check (spaces and dashes are allowed where usual).countrystring — Postcode: the ISO country (US, GB, CA, AU, NZ, DE, FR, NL, IE, ES, IT, …). Phone: the default country (ISO code or calling code such as 64) for numbers without +.id_typechoice · us_ssn / uk_nino / ca_sin / au_tfn / nz_ird / nz_nhi / … — For national_id: which scheme.
Outputs
validbooleannormalizedstring — The value in its standard form (IBAN without spaces, E.164 phone, upper-case postcode with standard spacing, digits-only card number, …).reasonstring — Why the value is invalid (empty when valid).detailsobject — Type-specific facts: iban country, bban and formatted; bic bank_code, country, branch; card issuer, last4, masked; email local, domain; phone country_code, national_number, international; national_id formatted.
Validate many validate_many
Check a list of { type, value } entries at once (e.g. every field of an onboarding form) and get one result per entry plus whether all are valid.
Inputs
itemslist of objects · required — List of { "type": "email", "value": "…", "name"?: "label", "country"?: "NZ", "id_type"?: "nz_ird" }.each: type (string), value (string), name (string), country (string), id_type (string)countrystring — Used for phone and postcode entries without their own country.
Outputs
resultslist of objects — One per item, in order.each: name (string), type (string), value (string), valid (boolean), normalized (string), reason (string)all_validbooleanvalid_countintegerinvalid_countinteger
Format number format_number
Format a number for a locale: grouping and decimal separators, percent (0.25 → 25%), currency, or compact (1.2K) notation.
Inputs
valuenumber · required — The number. For percent, 0.25 is 25%.localestring — BCP 47 locale, e.g. en-US, en-NZ, de-DE, fr-FR, ja-JP.stylechoice · decimal / percent / currency — Plain number, percent or currency.currencystring — For the currency style: ISO 4217 code (USD, EUR, NZD, JPY, …).minimum_fraction_digitsinteger — Optional: at least this many decimal places.maximum_fraction_digitsinteger — Optional: at most this many decimal places (rounded).use_groupingboolean — Group digits (1,234,567).notationchoice · standard / compact / scientific / engineering — Standard, compact (1.2M), scientific or engineering.
Outputs
formattedstring
Format currency format_currency
Format an amount of money for a locale and currency, with the currency's usual decimals (JPY has none) and symbol, code or name.
Inputs
valuenumber · required — The amount.currencystring · required — ISO 4217 code (USD, EUR, GBP, NZD, AUD, JPY, …).localestring — BCP 47 locale, e.g. en-US, en-NZ, de-DE, fr-FR, ja-JP.displaychoice · symbol / narrowSymbol / code / name — Symbol ($), narrow symbol, ISO code (NZD) or name (New Zealand dollars).accountingboolean — Show negative amounts in brackets, e.g. ($1,234.50).minimum_fraction_digitsinteger — Optional: at least this many decimal places.maximum_fraction_digitsinteger — Optional: at most this many decimal places (rounded).
Outputs
formattedstringcurrencystring
Parse number parse_number
Read a number typed the way a locale writes it: "1.234,56" in de-DE and "1,234.56" in en-US are both 1234.56. Handles currency symbols and codes, percent (12% → 0.12), brackets and minus signs, and local digits.
Inputs
textstring · required — The number as text.localestring — BCP 47 locale, e.g. en-US, en-NZ, de-DE, fr-FR, ja-JP.
Outputs
valuenumber — The number (empty when the text is not a number).validboolean — Whether the text could be read as a number.decimal_separatorstring — The locale's decimal separator.group_separatorstring — The locale's thousands separator.
Format phone format_phone
Normalise a phone number to E.164 (+64211234567), or format it in international (+64 21 123 4567) or national (021 123 4567) style with simple grouping. North American numbers use (415) 555-0132.
Inputs
valuestring · required — As typed: with + and country code, or national with Country set.countrystring — ISO country (NZ, US, GB, …) or calling code (64) for numbers without +.formatchoice · e164 / international / national — Output style.
Outputs
formattedstring — Empty when the number is not valid.e164stringvalidbooleanreasonstring — Why the number is invalid (empty when valid).
Network
None. The action cannot make requests.
Data and files
None. It only sees its inputs.
Secrets
None.
Install
Install it in your workspace
Works on UserTasks cloud and any self-hosted instance. The action lands in Extensibility → Workflow actions, enabled, with its sample workflow.
In the app
- Open Extensibility → Workflow actions → Browse gallery and choose Install on Validation & formatting. Or download workflow-action-validation-formatting-1.0.0.utpkg and drag it onto Automations → Packages.
- The wizard verifies the checksum, every file hash and the signature, and shows what it adds.
- In the workflow designer, drag Validation & formatting from Custom actions, pick a function and fill its inputs. Save & Test shows the typed outputs.
With the CLI
curl -fLO https://usertasks.com/gallery/workflow-action-validation-formatting-1.0.0.utpkg
usertasks packages install workflow-action-validation-formatting-1.0.0.utpkg
usertasks activities test ut_validate -f '{"operation":"validate"}'Verify the download
- File SHA-256
- 242b544172d3ab82251b00aec82d6e8d665954261b862cdf5d76d8bf14a2b271
- Package checksum (what is signed)
- sha256:1923884035e108b5cbf16b867c64884a576635c347d088820d5fb6274a9698eb
- Module SHA-256
- 2f214f537ebc8bc9cab611955e978a2783ac97420c3624180f3908d14aa1f00c
- Signer
- UserTasks Gallery · 49:f3:04:90:47:02:4d:07:28:61:3d:dc:bb:aa:db:11
More workflow actions
All actionsCrypto & IDs
ut_crypto
UUID v4/v7 and ULIDs, SHA hashes, HMAC webhook signatures with a stored secret, base64/hex/URL encoding, random and one-time codes, and HS256 JWTs.
UUID · ULID · Hash · HMAC signature · Encode · Decode · +4 more
10 functions Uses secrets
Data transform
ut_data
Select by JSON path, map, filter, sort, group and aggregate, pivot, de-duplicate and join lists of records, and convert CSV to JSON and back.
Select (JSON path) · Map fields · Filter · Sort · Group & aggregate · Pivot · +5 more
11 functions Pure computation
Dates & business calendar
ut_dates
Business days around holidays, SLA due times in working hours across time zones and DST, durations and ages, recurring schedules and fiscal periods.
Add business days · SLA due time · Duration / age · Convert time zone · Next occurrences · Fiscal period
6 functions Pure computation