Results for “Text validation & formatting”
Small, practical examples. Search by task or narrow things down below.
Read a JSONB field as text
Extract a nested value from a JSON document.
jsonb✓ Tested
Remove surrounding spaces from text
SQL: TRIM removes leading and trailing space characters by default.
SQL✓ Tested
Remove surrounding spaces from text
SQL Server: TRIM removes leading and trailing space characters by default.
SQL Server✓ Tested
Remove surrounding spaces from text
Postgres: TRIM removes leading and trailing space characters by default.
Postgres✓ Tested
Remove surrounding spaces from text
SQLite: TRIM removes leading and trailing space characters by default.
SQLite✓ Tested
Replace all matching text
Normalize repeated whitespace with a regular expression.
regexp_replace✓ Tested
Require a nonempty text value
HTML: The required attribute makes an empty text control fail native constraint validation.
HTML✓ Tested
Search text without case sensitivity
Match a pattern with PostgreSQL ILIKE.
ILIKE✓ Tested
Split delimited text with positions
Retain original order with STRING_SPLIT ordinals.
STRING_SPLIT✓ Tested
Accept several lines of text
HTML: Learn how to accept several lines of text in a complete browser example.
HTML✓ Tested
Add a multiline text field
Set a maximum length and visible rows on a labeled HTML textarea.
HTML✓ Tested
Add context to a parsing failure
Add context to a parsing failure in a complete Rust program using the standard library.
Rust✓ Tested