https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.validateargumentsattribute.validate?view=powershellsdk-7.4.0
ValidateArgumentsAttribute.Validate(Object, EngineIntrinsics) Method (System.Management.Automation)...
Verify that the value of arguments is valid.
system managementvalidateobjectmethodautomation