New-UDTextBox -mask is gone?

Product: PowerShell Universal
Version: 1.4.6

I tried finding older topics, but apparently mask has been removed since then? It still shows up in the documentation, but it is clearly no longer an option in the product. Is that correct? Is there any field masking at all anymore?

What version are you on?

In v5, a masked text input can be accomplished with New-UDTextbox -Type password <...>

P.S. Welcome!!

Oh awesome thanks. Yes I am on v5. New to PSU, so I’m trying to use the documentation but it doesn’t seem to be fully updated yet.

But what about phone numbers? That doesn’t appear to be a mask you can do with it.

Correct - to my knowledge at least. I have a custom method I use to format phone numbers that you may be able to make use of with the -OnChange event handler:

function Format-PhoneNumber ($Number) {
  $PhoneNumberFormat = "+1 (###) ###-####"
  $PhoneNumber = "{0:$PhoneNumberPattern}" -f [int64]($Number)
  return $PhoneNumber
}

Usage:
Format-PhoneNumber -Number "2125550123"
Returns:
+1 (212) 555-0123
DISCLAIMER: I have no earthly idea how this will work when using the OnChange handler if the value gets fed back into itself. Be careful!