Results for “Dates & numeric validation”
Small, practical examples. Search by task or narrow things down below.
Raise and catch a domain-specific exception
Python: Give a validation failure its own exception type so callers can handle it narrowly.
Python✓ Tested
Read a JSON property
Parse a JSON document and dispose it after reading in C#.
C#✓ Tested
Read an integer from serial input
Arduino / C: parseInt skips leading nonnumeric characters and reads the next integer.
Arduino / C✓ Tested
Read named regex capture groups
JavaScript: Named groups make a fixed input format easier to inspect than numeric group positions.
JavaScript✓ Tested
Read named regex capture groups
TypeScript: Named groups make a fixed input format easier to inspect than numeric group positions.
TypeScript✓ Tested
Rename a configured remote
Git: Renaming a remote updates its associated configuration and remote-tracking references.
Git✓ Tested
Rename a container without recreating it
Docker / Compose: rename updates the container name while preserving its identity.
Docker / Compose✓ Tested
Replace text in a string
Replace every occurrence of a substring and keep the result in a new string. The original string is unchanged.
string✓ Tested
Replay an unpublished branch on a newer base
Git: Rebase updates the base of local feature commits when their changes do not conflict.
Git✓ Tested
Require a nonempty text value
HTML: The required attribute makes an empty text control fail native constraint validation.
HTML✓ Tested
Require a value with NOT NULL
SQL: Declare required fields at the database boundary, not only in application validation.
SQL✓ Tested
Require a value with NOT NULL
SQL Server: Declare required fields at the database boundary, not only in application validation.
SQL Server✓ Tested