FIND YOUR NEXT FEW LINES
Results for “Dates & time zones”
Small, practical examples. Search by task or narrow things down below.
293 snippets foundClear filters
Use an optional fallback
Use Optional.orElse to provide a default for a missing Java value.
Java✓ Tested
Validate a complete identifier with a regex
C#: Use absolute anchors and a timeout so the regex checks the complete input with a bounded execution time.
C#✓ Tested
Validate a field when focus leaves it
Validate a field when focus leaves it with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Validate an unknown value with a type guard
Check a field before treating unknown data as a typed object.
unknown✓ Tested
Validate email syntax with Angular’s email validator
Validate email syntax with Angular’s email validator with a standalone Angular component and explicit browser behavior.
Angular✓ Tested