Loading…
Tuesday April 14, 2026 1:15pm - 1:40pm PDT
Ever wished your functions could reject bad input before they even start running? Imagine a world where your parameters do not just accept values, but actively enforce your rules, ensuring IDs have the right prefix, versions follow semantic rules, or environments are always Dev, Test, or Prod. Welcome to the power of custom validation classes in PowerShell!

The built in validation checks are great for simple cases. Things like ValidateNotNull, ValidateRange, or ValidatePattern handle a lot of common needs. But sometimes your rules are more complex: semantic version checks, cross parameter logic, or enforcing business specific naming conventions. That is where custom validation attributes shine.

In this session, we will explore how to create your own validation attributes by building classes that derive from ValidateArgumentsAttribute. You will see how to package up complex rules once and reuse them across all your functions, keeping your code clean and your error messages friendly. We will walk through real examples like validating ticket IDs, checking semantic version strings, and controlling file path safety.

Think of custom validation attributes as the bouncers at the door of your functions, keeping the bad data out, letting the good data in, and making sure only the right values ever make it past the rope.
Speakers
avatar for Emrys MacInally

Emrys MacInally

Team Lead Deployment & Automation / DevOps Engineer, medavis
Has been having fun with PowerShell since 2007 and loves to deploy software.
Tuesday April 14, 2026 1:15pm - 1:40pm PDT
Meydenbauer Center - Room 406 11100 NE 6th St, Bellevue, WA 98004, USA

Sign up or log in to save this to your schedule, view media, check-in, leave feedback and see who's attending!

Share Modal

Share this link via

Or copy link