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 Pages
Answered

Field Validation

(0) ShareShare
ReportReport
Posted on by 62

Hi All,

 

I have a 'Social Security Number (SSN)' field in portal. In CRM it is a text field.

I formatted SSN like this (123-45-6789) total 11 characters. It on Subgurid entity form in portal.

Issue is when i enter less then 11 characters it accepting. I need to validate like it should have 11 characters when on change.

 I tried using Page_Validators but no luck.

 

Thank you. 

Categories:
  • Verified answer
    H V Profile Picture
    1,510 on at

    Hi @SunilR

    You can add web form meta data attribute from webform.

    Select a field which you want to validate. 

    There will be option of Regular Expression. 

    Add below code into that textbox:

    ^\d{3}-\d{2}-\d{4}$

  • the365bit Profile Picture
    136 on at

    I actually had a very similar requirement last week and I solved it using page validators and this page as documentation https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/add-custom-javascript 

     

    but I guess the answer from @hardikv sounds simpler I might try it as well. 

  • Verified answer
    H V Profile Picture
    1,510 on at

    Hi @SunilR

     

    Did that help to solve your issue? Can you mark as the answer so it helps other users?

  • chauhanhardik Profile Picture
    37 on at

    Hi @the365bit/@hardikv 

     

    Please have a look at below query

    validate field value with RegEx on field focusOut - Power Platform Community (microsoft.com)

     

    And Any idea how it can be achieved with page validators and/or regex. On submit it works fine, but I want to display error message on field focusOut.

     

    Thanks,

    Hardik Chauhan

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
M Bilal Khan Profile Picture

M Bilal Khan 110

#2
Mohsin Ali Profile Picture

Mohsin Ali 30

#2
sannavajjala87 Profile Picture

sannavajjala87 30 Super User 2026 Season 2

Last 30 days Overall leaderboard