cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KoenJanssensPD
Post Patron
Post Patron

Optional character in input mask

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

1 ACCEPTED SOLUTION

Accepted Solutions
cchannon
Super User
Super User

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.

View solution in original post

1 REPLY 1
cchannon
Super User
Super User

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.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,818)