FIND YOUR NEXT FEW LINES

Results for “Dates & numeric validation”

Small, practical examples. Search by task or narrow things down below.

303 snippets foundClear filters
PythonFunctions & error handling

Raise and catch a domain-specific exception

Python: Give a validation failure its own exception type so callers can handle it narrowly.

Python✓ Tested
C#Data & dates

Read a JSON property

Parse a JSON document and dispose it after reading in C#.

C#✓ Tested
Arduino / CSerial protocols

Read an integer from serial input

Arduino / C: parseInt skips leading nonnumeric characters and reads the next integer.

Arduino / C✓ Tested
JavaScriptRegular expressions & URL encoding

Read named regex capture groups

JavaScript: Named groups make a fixed input format easier to inspect than numeric group positions.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Read named regex capture groups

TypeScript: Named groups make a fixed input format easier to inspect than numeric group positions.

TypeScript✓ Tested
GitRemotes & additional checkouts

Rename a configured remote

Git: Renaming a remote updates its associated configuration and remote-tracking references.

Git✓ Tested
Docker / ComposeContainer lifecycle

Rename a container without recreating it

Docker / Compose: rename updates the container name while preserving its identity.

Docker / Compose✓ Tested
PythonStrings & dates

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
GitMerging & replaying changes

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
HTMLInput constraints

Require a nonempty text value

HTML: The required attribute makes an empty text control fail native constraint validation.

HTML✓ Tested
SQLConstraints & defaults

Require a value with NOT NULL

SQL: Declare required fields at the database boundary, not only in application validation.

SQL✓ Tested
SQL ServerConstraints & defaults

Require a value with NOT NULL

SQL Server: Declare required fields at the database boundary, not only in application validation.

SQL Server✓ Tested