Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Metadata Regex Power Apps Portals Always matching

(0) ShareShare
ReportReport
Posted on by

Im currently encountering an issue with Power Apps portals whereby when I create a metadata record to perform field validation with Regex, I always hit that condition. Please see a screenshot of my metadata record with the regex

pastedimage1585882983701v5.png

As we can see here I'm using the regex pattern /([0-9])/ to find any numbers in the following field.

pastedimage1585882962302v3.png

This clearly shouldn't be matching thus we should be okay to proceed. Anyone ran into a similar issue? 

  • Community Member Profile Picture
    on at
    RE: Metadata Regex Power Apps Portals Always matching

    You're a god among men. This is stupidly simple. I'll mark as the answer! Thank you for your help!

  • Verified answer
    cloflyMao Profile Picture
    25,208 on at
    RE: Metadata Regex Power Apps Portals Always matching

    Hi Ethan,

    Sorry for misunderstanding your issue.

    I have never expericenced using web form metedata record for validation and not really familar about regex.

    However, from my latest test, it seems that the field will only allow field value which match regex.

    (Definition from doc: The validation error message to display if the regular expression validated fails.)

    e.g: your previous regex actually will only allow numbers in first name field,

    if you would like to only allow english characters, we should instead use ^[A-Za-z]+$.

    pastedimage1585897563080v2.png

    pastedimage1585897547825v1.png

    After changing regex the form works.

    pastedimage1585897605537v3.png

    Of course, please click "Browse website" for refreshing.

    Regards,

    Clofly

  • Community Member Profile Picture
    on at
    RE: Metadata Regex Power Apps Portals Always matching

    I have tried configuring a metadata record for this before. However there is no JavaScript sitting on this step. Thank you for your example too. Does it successfully allow for the user to pass the step though if the input is valid?

    That was my biggest issue, I can get the record to hit on a negative result. But the positive where it should allow the user to continue is the issue.

    I'll try those actions and report back!

  • cloflyMao Profile Picture
    25,208 on at
    RE: Metadata Regex Power Apps Portals Always matching

    Hi Ethan,

    Have you added other validation to the field?(e.g: custom javascript had been added for web form step.)

    If not, you could take my web form metadata record as reference, which works well.

    Required fields:

    pastedimage1585895873971v1.png

    Regular validation:

    pastedimage1585895904419v2.png

    Result:

    pastedimage1585895926077v3.png

    In addition, have you ever run metadata validation for first name field previously?

    Please open portal again via "Browse website" button in make.powerapps.com to refresh cache to make website configuration get update, 

    pastedimage1585896008971v4.png

    or restart your portal if above step not works.

    Regards,

    Clofly

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 78 Super User 2025 Season 1

#3
Sahra Profile Picture

Sahra 43

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans