-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Add ErrorMessage parameter to ValidatePatternAttribute #2719
Copy link
Copy link
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
The errors provided when a parameter validates a [ValidatePattern("somehorribleregex")] is hard to interpret for the user.
It would be useful to be able to provide a human readable error message when the validation fails. Regexs are powerful, but not readable.
Any yes, even if localization may be an issue, it is still better than the regex. :)