Customer registration: how to validate 'date of birth' of customer?Create Account not working properly for Guest User : Delete operation is forbidden for current area (Enterprise Magento ver. 2.1.0)Set customer group from customer registration formUpload a file on customer registration page Magento 2UI Component Form Validation: Pattern methodMagento 2 validate filesizeValidate mass action columnAssign a customer group on registration. magento 2Custom added field to checkout is not validating when I go the next stephow to generate custom password for customer registration in Magento2?

Math equation in non italic font

How to terminate ping <dest> &

Official degrees of earth’s rotation per day

How to write cleanly even if my character uses expletive language?

Problem with FindRoot

What options are left, if Britain cannot decide?

Recruiter wants very extensive technical details about all of my previous work

Is it possible to upcast ritual spells?

ERC721: How to get the owned tokens of an address

Min function accepting varying number of arguments in C++17

Alternative heavy right tailed distribution to exponential distribution

Are Roman Catholic priests ever addressed as pastor

Bacteria contamination inside a thermos bottle

"of which" is correct here?

How to explain that I do not want to visit a country due to personal safety concern?

Have researchers managed to "reverse time"? If so, what does that mean for physics?

What did “the good wine” (τὸν καλὸν οἶνον) mean in John 2:10?

What do you call the act of removing a part of a word and replacing it with an apostrophe

Python if-else code style for reduced code for rounding floats

Does this sum go infinity?

Most cost effective thermostat setting: consistent temperature vs. lowest temperature possible

Professor being mistaken for a grad student

Knife as defense against stray dogs

Why does a Star of David appear at a rally with Francisco Franco?



Customer registration: how to validate 'date of birth' of customer?


Create Account not working properly for Guest User : Delete operation is forbidden for current area (Enterprise Magento ver. 2.1.0)Set customer group from customer registration formUpload a file on customer registration page Magento 2UI Component Form Validation: Pattern methodMagento 2 validate filesizeValidate mass action columnAssign a customer group on registration. magento 2Custom added field to checkout is not validating when I go the next stephow to generate custom password for customer registration in Magento2?













1















Need to check whether user has 18 years old (that's simply to do in javascript) then display error/success message and pass further.



How to add validation for 'date of birth' field in customer registration form?



Which js I should extend for this purpose?










share|improve this question














bumped to the homepage by Community♦ 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.



















    1















    Need to check whether user has 18 years old (that's simply to do in javascript) then display error/success message and pass further.



    How to add validation for 'date of birth' field in customer registration form?



    Which js I should extend for this purpose?










    share|improve this question














    bumped to the homepage by Community♦ 10 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      1












      1








      1








      Need to check whether user has 18 years old (that's simply to do in javascript) then display error/success message and pass further.



      How to add validation for 'date of birth' field in customer registration form?



      Which js I should extend for this purpose?










      share|improve this question














      Need to check whether user has 18 years old (that's simply to do in javascript) then display error/success message and pass further.



      How to add validation for 'date of birth' field in customer registration form?



      Which js I should extend for this purpose?







      magento-2.1






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 16 '16 at 15:29









      white-impwhite-imp

      341526




      341526





      bumped to the homepage by Community♦ 10 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community♦ 10 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You should extend this file with your own validation rule.




          '/lib/web/mage/validation.js'




          After you added your own validation rule just add the following to your input field



           data-validate="'Your-validation-name':true"


          example:



          data-validate="'custom-age-validation':true"





          share|improve this answer






















            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%2f131647%2fcustomer-registration-how-to-validate-date-of-birth-of-customer%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You should extend this file with your own validation rule.




            '/lib/web/mage/validation.js'




            After you added your own validation rule just add the following to your input field



             data-validate="'Your-validation-name':true"


            example:



            data-validate="'custom-age-validation':true"





            share|improve this answer



























              0














              You should extend this file with your own validation rule.




              '/lib/web/mage/validation.js'




              After you added your own validation rule just add the following to your input field



               data-validate="'Your-validation-name':true"


              example:



              data-validate="'custom-age-validation':true"





              share|improve this answer

























                0












                0








                0







                You should extend this file with your own validation rule.




                '/lib/web/mage/validation.js'




                After you added your own validation rule just add the following to your input field



                 data-validate="'Your-validation-name':true"


                example:



                data-validate="'custom-age-validation':true"





                share|improve this answer













                You should extend this file with your own validation rule.




                '/lib/web/mage/validation.js'




                After you added your own validation rule just add the following to your input field



                 data-validate="'Your-validation-name':true"


                example:



                data-validate="'custom-age-validation':true"






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 26 '17 at 14:20









                klictklict

                31718




                31718



























                    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%2f131647%2fcustomer-registration-how-to-validate-date-of-birth-of-customer%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

                    How to resolve Exception #0 (Exception): Notice: Array to string conversion Mailchimp ErrorUncaught Error: Call to a member function setItem() on boolean on product grid: Magento 2Not able to add/update magento2 category post upgrade from 1.9 to 2.1.0How to use session and pass some value to phtml file to phtml file?Trying to uninstall moduleadmin grid not workingMagento 2 Admin Menu Fatal Error-session time outMagento2.2.4 : Uninstall a theme throw exceptions?Notice: Array to string conversion errorMagento 2.2.6 exceptionDeleted ShipperHQ module causing error in “All Customers” section of Magento 2

                    Jet Time Laivasto | Lähteet | Aiheesta muualla | NavigointivalikkoJet Time - The CompanyThe CompanyManagementJet Time aloittaa lauantaina Suomi-rekisterissä olevalla Boeing 737 -koneellaJettime Finland Fleet Details and HistoryJettime Fleet Details and HistoryRegional Jet OÜ takes over ATR production for SASJet Time Returns To Its Core BusinessYhtiön kotisivutlaajentamalla

                    What would the climate of a planetwide city be like?What would the climate be like on an earth-like planet with only one convection cell per hemisphere?Vertical city - effects on climate?What would the geology and climate of a supposed landmass near the pole be like, assuming a thoroughly warmer planet?What would the climate on a planet with 85% or more of the surface area covered in water be like?How would this horrible climate be possibly?What would the climate zones of Pangea be?How would you redesign and revamp the city transit system?City-Closing EventCreating a layout of the cityIron deposits mined from under the city