FIND YOUR NEXT FEW LINES

Results for “validation”

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

118 snippets foundClear filters
HTMLInput constraints

Limit typed text to a maximum length

HTML: Maxlength limits ordinary user editing without replacing server-side validation.

HTML✓ Tested
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
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
PostgresConstraints & defaults

Require a value with NOT NULL

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

Postgres✓ Tested
SQLiteConstraints & defaults

Require a value with NOT NULL

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

SQLite✓ Tested
TypeScriptTypes & functions

Type a function’s inputs and output

Catch mismatched arguments during compilation.

function✓ Tested
jQueryEvent control

Validate a field when focus leaves it

jQuery: focusout bubbles and can support delegated form validation.

jQuery✓ Tested
HTMLForms

Validate an email input

Use browser constraint validation for a required HTML email field.

HTML✓ Tested