web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to verify Mobile phone field in marketing form

(0) ShareShare
ReportReport
Posted on by 25

Hi,

I currently using Marketing Forms/Pages within Dynamics 365 Marketing and I've noticed that client can submit Text in field "mobile phone".

Let's say that you have a sign up form containing phone numbers and the Marketing Form Fields. How can you then validate that people submit the form with the correct number value in mobile phone field? 

Thanks in advance,

Regards,

DB.

I have the same question (0)
  • Suggested answer
    Leah Ju Profile Picture
    Microsoft Employee on at

    Hi Partner,

    You can achieve it easily through Editing phone field in HTML editor of marketing form:

    (1)Check the HTML of the marketing form, the phone type is 'tel':

    pastedimage1668047024147v1.png

    Then i add pattern attribute to the <input> tag, which specifies a regular expression:

    Note: The pattern attribute works with the following input types: text, date, search, url, tel, email, and password.'

    My example: placeholder="123-45-678" pattern="[0-9]{3}-[0-9]{2}-[0-9]{3}"

    pastedimage1668048353110v4.png

    When i try to submit form with wrong format phone number, message will appear:

    pastedimage1668047904525v3.jpeg

    Correct format:

    pastedimage1668048451861v5.pngpastedimage1668048477649v6.png

    (2) Or you can change type to 'number', then the phone field will only allow numeric input.

    pastedimage1668048574036v7.png

    Test:

    pastedimage1668048783337v8.png

    ===========================

    For complex validation, we can achieve it with form API and custom logic.

    https://docs.microsoft.com/en-us/dynamics365/marketing/developer/marketing-form-client-side-extensibility#examples

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 66 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 45

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans