web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Optional character in ...
Power Apps
Answered

Optional character in input mask

(0) ShareShare
ReportReport
Posted on by 601

Hi,

 

Is there any way to have optional characters in a Input mask Control?

Currently, I have ">AAAAAAAA" as mask, but the requirement is to have 7 or 8 characters...

I thought about ">AAAAAAAa" but that means the user has to enter an additional character (space) when it has only 7 characters...

 

Thanks,

Koen

I have the same question (0)
  • Verified answer
    cchannon Profile Picture
    4,702 Moderator on at

    AFAIK, no, there is no regex "?" equivalent in the field mask capability. The only "optional" characters are "character or space" not "character or null".

    To accomplish this, you can write client script to watch the field, or you could make a PCF for it. In either case, the coding would not be very complex; just a single regex validation.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 602

#2
WarrenBelz Profile Picture

WarrenBelz 473 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 310

Last 30 days Overall leaderboard