Results for “constrain”
Small, practical examples. Search by task or narrow things down below.
Require a value with NOT NULL
SQLite: Declare required fields at the database boundary, not only in application validation.
SQLite✓ Tested
Require numeric values on a chosen step
HTML: The step interval is measured from the minimum value when one is provided.
HTML✓ Tested
Select a time in quarter-hour increments
HTML: A time step is expressed in seconds, so 900 represents fifteen minutes.
HTML✓ Tested
Validate a structured text identifier
HTML: The pattern attribute matches the entire nonempty input; required handles the empty case.
HTML✓ Tested
Validate the shape of an absolute URL
HTML: A URL input checks syntax, not whether a resource exists or is safe.
HTML✓ Tested
Cap a box’s width
CSS: Max-width constrains an otherwise larger declared width.
CSS✓ Tested
Distinguish a file from a directory
PowerShell: Test-Path can constrain the kind of item that is accepted.
PowerShell✓ Tested
Find empty regular files
Linux Commands: Use the empty predicate with a file type constraint.
Linux Commands✓ Tested
Map an input range to an output range
Scale an integer reading to a different interval.
map✓ Tested
Style a control that fails native validation
CSS: Invalid reflects the input’s current constraint-validation result.
CSS✓ Tested
Truncate a single line
Combine CSS overflow and ellipsis for a constrained single line.
CSS✓ Tested
Update a row on conflict
Use a primary key to insert or update one value.
upsert✓ Tested