cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KoenJanssensPD
Helper V
Helper V

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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,301)