Magento 2 - How to validate your input with custom validation Planned maintenance scheduled...

Can a Knight grant Knighthood to another?

Does Prince Arnaud cause someone holding the Princess to lose?

Why aren't road bike wheels tiny?

How to ask rejected full-time candidates to apply to teach individual courses?

How to produce a PS1 prompt in bash or ksh93 similar to tcsh

Compiling and throwing simple dynamic exceptions at runtime for JVM

Can I ask an author to send me his ebook?

Coin Game with infinite paradox

If gravity precedes the formation of a solar system, where did the mass come from that caused the gravity?

Can I take recommendation from someone I met at a conference?

2 sample t test for sample sizes - 30,000 and 150,000

Who's this lady in the war room?

Why doesn't the university give past final exams' answers?

How can I introduce the names of fantasy creatures to the reader?

Protagonist's race is hidden - should I reveal it?

Is there a verb for listening stealthily?

What is the evidence that custom checks in Northern Ireland are going to result in violence?

What's the connection between Mr. Nancy and fried chicken?

Can a Wizard take the Magic Initiate feat and select spells from the Wizard list?

Has a Nobel Peace laureate ever been accused of war crimes?

Why do C and C++ allow the expression (int) + 4*5?

Does the Pact of the Blade warlock feature allow me to customize the properties of the pact weapon I create?

Are Flameskulls resistant to magical piercing damage?

Why isn't everyone flabbergasted about Bran's "gift"?



Magento 2 - How to validate your input with custom validation



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?How to validate dynamically created forms on same page with VarienForm?M2: Custom form validationMagento 2: Custom validation for system.xmlMagento 2 checkout input field validation possibilityMagento 2: How to give Admin Input Field ValidationMagento 2: Custom validation on product attributeValidate form field on perticular action in Magento 2Add further checkout form validation Magento 2How to validate Magento 2 form field input value with database table field to find out if already exists?Magento 2 validate the form input using plugin and save the modified data





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















We have created custom attribute name "username" for customers.



We need to validate the username by allowing certain characters only.



i.e. Username should contain : a-z A-Z 0-9 & .@_- only










share|improve this question





























    1















    We have created custom attribute name "username" for customers.



    We need to validate the username by allowing certain characters only.



    i.e. Username should contain : a-z A-Z 0-9 & .@_- only










    share|improve this question

























      1












      1








      1








      We have created custom attribute name "username" for customers.



      We need to validate the username by allowing certain characters only.



      i.e. Username should contain : a-z A-Z 0-9 & .@_- only










      share|improve this question














      We have created custom attribute name "username" for customers.



      We need to validate the username by allowing certain characters only.



      i.e. Username should contain : a-z A-Z 0-9 & .@_- only







      magento2 customer customer-account






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 14 mins ago









      Sudhanshu BajajSudhanshu Bajaj

      283




      283






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f271011%2fmagento-2-how-to-validate-your-input-with-custom-validation%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f271011%2fmagento-2-how-to-validate-your-input-with-custom-validation%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

          How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

          變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...