cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SunilR
Helper I
Helper I

Field Validation

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. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
hardikv
Impactful Individual
Impactful Individual

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}$

View solution in original post

hardikv
Impactful Individual
Impactful Individual

Hi @SunilR

 

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

View solution in original post

4 REPLIES 4
hardikv
Impactful Individual
Impactful Individual

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}$

View solution in original post

the365bit
Resolver I
Resolver I

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. 

hardikv
Impactful Individual
Impactful Individual

Hi @SunilR

 

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

View solution in original post

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

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,063)