Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Correct usage of [Validatenotnullorempty]

$
0
0

@Mike – I agree using validatescript that returns true\false is a nice trick. I had picked it up from a script posted by jeff hicks i think, cannot remember the link though but thanks for posting it; should be helpful to the community. Also i use write-warning instead of “throw” because it shows the message in a color that is easier on the eye :)
of course there are people who would want to change the default color of the error message from red to something else but for my purposes the defaults work :).


Viewing all articles
Browse latest Browse all 13067

Trending Articles