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 disable error validation from Dynamic 365 marketing form

(0) ShareShare
ReportReport
Posted on by 14
Is there any way to disable in-built error validation( This field is required ) for Email in Dynamic 365 Marketing Form? We were able to disable for First name and Last name. Basically we have implemented custom error validation but along with that we're getting in-built error pop-up as well which is not required now as shown in attachment. We tried to remove that validation from Form designer but then we're not able to Save the form.
 
////
I have the same question (0)
  • LanceP1906 Profile Picture
    54 on at
    Anytime you begin to mess with the OOB structure, you run the risk of the form/email no longer being stable. 
  • Suggested answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
     Hi,
     
    Marketing form provides the OOB function to set the error validation ( This field is required ).
    1. For the outbound marketing form the settings are as follows.

     
    2. For the real-time marketing form the settings are as follows.

     
    I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.
     
    Best Regards,
    Dengliang Li
  • Community member Profile Picture
    14 on at
    As I mentioned, we were able to set required property off for first name and last name fields but not for email field. While trying for email, we're getting below error and not able to save form:
     
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    Since the matching strategy associated with the form matches based on email addresses by default, the email field must have the Required attribute set.

    However, the matching strategy must have at least one matching attribute. Otherwise, the form will report an error.

    Therefore, it is possible to change the matching attribute in the matching strategy and set it to another field. In this way, the email field will not be forced to be set to the Required attribute.

     
    It is important to highlight that the field associated with the matching attribute in the matching strategy must be added to the form and must be set to the Required attribute.

     
    I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.
     
    Best Regards,
    Dengliang Li
     
  • Community member Profile Picture
    14 on at
    Okay. This way we're good for first name , last name and email fields but we need to keep the new Field( for example City ) on page as well and without that we won't be able to Save the form. Correct?
    We need only three fields in form first name , last name and email
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    Your understanding is correct.
    It is a design requirement of the product that at least one field of the required attribute needs to exist in the form.
     
    Best Regards,
    Dengliang Li
     
  • Community member Profile Picture
    14 on at
    Got it. Make sense.
    Well, in order to meet custom error validation we have added below JS code in form HTML script tag. Is that correct approach for this custom implementation?
    document.getElementsByTagName("form")[0].addEventListener("invalid", function(e){e.preventDefault();}, true);
     
     

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 118 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 46 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 41

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans