cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

How to validate phone field on model driven

Hello everyone,

I'm building my first app and I faced a problem on model-driven validation

- Forcing the phone number field to be numbers only

- how to force the number to be 11 exactly

I would really appreciate any advice you might have.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Hi @MohammedWard,

I assume your field type is single line of text. You can easily format to phone by with the Input Mask control. Here are the quick steps:

  1. Open your solution that contains that entity and open the main form. Click the "switch to classic" button on the top
  2. Select the phone number field and click "Change Properties"
  3. Navigate to the Controls tab and click on "Add Control"
  4. Select "Input Mask" and click add
  5. Pick you field for the Field property
  6. Enter the mask (00000000000) for the Mask property. You can also put dashes
  7. Ensure the Input Mask control is selected for Web, Phone and Tablet.
  8. Save all and publish all customization

2020-06-20_10-09-00.png

Hope this helps!

View solution in original post

2 REPLIES 2
Super User II
Super User II

Hi @MohammedWard,

I assume your field type is single line of text. You can easily format to phone by with the Input Mask control. Here are the quick steps:

  1. Open your solution that contains that entity and open the main form. Click the "switch to classic" button on the top
  2. Select the phone number field and click "Change Properties"
  3. Navigate to the Controls tab and click on "Add Control"
  4. Select "Input Mask" and click add
  5. Pick you field for the Field property
  6. Enter the mask (00000000000) for the Mask property. You can also put dashes
  7. Ensure the Input Mask control is selected for Web, Phone and Tablet.
  8. Save all and publish all customization

2020-06-20_10-09-00.png

Hope this helps!

View solution in original post

Thank you EricRegnier ... it's working 😍

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Users online (7,597)