Flutter - can't see validation messages for disabled form fields Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!A potentially dangerous Request.Form value was detected from the clientDisable validation of HTML5 form elementsAngularjs prevent form submission when input validation failsPrevent validation messages appeared if fields are disabledshow validation error messages on submit in angularjsDisabled required validator still causes validationFlutter firebase validation of form field inputsLaravel Form Validation Message ViewFlutter Textfield Validation message indexingDisable jsf form int validation

How to get even lighting when using flash for group photos near wall?

What was Apollo 13's "Little Jolt" after MECO?

Book with legacy programming code on a space ship that the main character hacks to escape

How to translate "red flag" into Spanish?

Check if a string is entirely made of the same substring

Why did C use the -> operator instead of reusing the . operator?

Would reducing the reference voltage of an ADC have any effect on accuracy?

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

What *exactly* is electrical current, voltage, and resistance?

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

How can I wire a 9-position switch so that each position turns on one more LED than the one before?

What is the best way to deal with NPC-NPC combat?

Why does the Cisco show run command not show the full version, while the show version command does?

Multiple options vs single option UI

Could moose/elk survive in the Amazon forest?

Where did Arya get these scars?

Align column where each cell has two decimals with siunitx

Mistake in years of experience in resume?

Does Feeblemind produce an ongoing magical effect that can be dispelled?

What is the least dense liquid under normal conditions?

How to not starve gigantic beasts

Passing args from the bash script to the function in the script

What is the ongoing value of the Kanban board to the developers as opposed to management

What's parked in Mil Moscow helicopter plant?



Flutter - can't see validation messages for disabled form fields



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!A potentially dangerous Request.Form value was detected from the clientDisable validation of HTML5 form elementsAngularjs prevent form submission when input validation failsPrevent validation messages appeared if fields are disabledshow validation error messages on submit in angularjsDisabled required validator still causes validationFlutter firebase validation of form field inputsLaravel Form Validation Message ViewFlutter Textfield Validation message indexingDisable jsf form int validation



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















For my Flutter App, I'm using many input form fields for data input, and assigning a validation method for each, for all fields the error message appears normally, just below the field, except for one field that takes value from a picker dialog, so that i made it disabled (enabled=false) to prevent user input on it



Is it normal that a disabled field doesn't show validation error messages? if yes, should i do something different to prevent user input on that field other than making it disabled?










share|improve this question






























    0















    For my Flutter App, I'm using many input form fields for data input, and assigning a validation method for each, for all fields the error message appears normally, just below the field, except for one field that takes value from a picker dialog, so that i made it disabled (enabled=false) to prevent user input on it



    Is it normal that a disabled field doesn't show validation error messages? if yes, should i do something different to prevent user input on that field other than making it disabled?










    share|improve this question


























      0












      0








      0








      For my Flutter App, I'm using many input form fields for data input, and assigning a validation method for each, for all fields the error message appears normally, just below the field, except for one field that takes value from a picker dialog, so that i made it disabled (enabled=false) to prevent user input on it



      Is it normal that a disabled field doesn't show validation error messages? if yes, should i do something different to prevent user input on that field other than making it disabled?










      share|improve this question
















      For my Flutter App, I'm using many input form fields for data input, and assigning a validation method for each, for all fields the error message appears normally, just below the field, except for one field that takes value from a picker dialog, so that i made it disabled (enabled=false) to prevent user input on it



      Is it normal that a disabled field doesn't show validation error messages? if yes, should i do something different to prevent user input on that field other than making it disabled?







      validation input flutter






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 22 at 17:12







      Mohamed Selim

















      asked Mar 22 at 15:47









      Mohamed SelimMohamed Selim

      1,7971628




      1,7971628






















          2 Answers
          2






          active

          oldest

          votes


















          0














          If you don't want to default validation in some field than you should be use TextField instant of TextFormField and do validation by controller.






          share|improve this answer























          • I do need the default validation, and need to prevent user input on it, the problem is that making it disabled, hides the validation message

            – Mohamed Selim
            Mar 23 at 10:38


















          0














          I can't imagine that this behavior is intended, I don't know why the disabled field shouldn't show the error message, if it isn't a bug, then the upcoming flutter versions shall provide a readonly or similar property to use in such case



          Any way, for the time being I've edited flutter code to show the disabled field error message



          in the file flutterpackagesflutterlibsrcmaterialinput_decorator.dart



          change the method



          TextStyle _getErrorStyle(ThemeData themeData) 
          final Color color = decoration.enabled? themeData.errorColor : Colors.transparent;
          return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);



          to be



          TextStyle _getErrorStyle(ThemeData themeData) 
          final Color color = themeData.errorColor;
          return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fstackoverflow.com%2fquestions%2f55303323%2fflutter-cant-see-validation-messages-for-disabled-form-fields%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            If you don't want to default validation in some field than you should be use TextField instant of TextFormField and do validation by controller.






            share|improve this answer























            • I do need the default validation, and need to prevent user input on it, the problem is that making it disabled, hides the validation message

              – Mohamed Selim
              Mar 23 at 10:38















            0














            If you don't want to default validation in some field than you should be use TextField instant of TextFormField and do validation by controller.






            share|improve this answer























            • I do need the default validation, and need to prevent user input on it, the problem is that making it disabled, hides the validation message

              – Mohamed Selim
              Mar 23 at 10:38













            0












            0








            0







            If you don't want to default validation in some field than you should be use TextField instant of TextFormField and do validation by controller.






            share|improve this answer













            If you don't want to default validation in some field than you should be use TextField instant of TextFormField and do validation by controller.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 23 at 4:58









            Nikhil_VadoliyaNikhil_Vadoliya

            24445




            24445












            • I do need the default validation, and need to prevent user input on it, the problem is that making it disabled, hides the validation message

              – Mohamed Selim
              Mar 23 at 10:38

















            • I do need the default validation, and need to prevent user input on it, the problem is that making it disabled, hides the validation message

              – Mohamed Selim
              Mar 23 at 10:38
















            I do need the default validation, and need to prevent user input on it, the problem is that making it disabled, hides the validation message

            – Mohamed Selim
            Mar 23 at 10:38





            I do need the default validation, and need to prevent user input on it, the problem is that making it disabled, hides the validation message

            – Mohamed Selim
            Mar 23 at 10:38













            0














            I can't imagine that this behavior is intended, I don't know why the disabled field shouldn't show the error message, if it isn't a bug, then the upcoming flutter versions shall provide a readonly or similar property to use in such case



            Any way, for the time being I've edited flutter code to show the disabled field error message



            in the file flutterpackagesflutterlibsrcmaterialinput_decorator.dart



            change the method



            TextStyle _getErrorStyle(ThemeData themeData) 
            final Color color = decoration.enabled? themeData.errorColor : Colors.transparent;
            return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);



            to be



            TextStyle _getErrorStyle(ThemeData themeData) 
            final Color color = themeData.errorColor;
            return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);






            share|improve this answer



























              0














              I can't imagine that this behavior is intended, I don't know why the disabled field shouldn't show the error message, if it isn't a bug, then the upcoming flutter versions shall provide a readonly or similar property to use in such case



              Any way, for the time being I've edited flutter code to show the disabled field error message



              in the file flutterpackagesflutterlibsrcmaterialinput_decorator.dart



              change the method



              TextStyle _getErrorStyle(ThemeData themeData) 
              final Color color = decoration.enabled? themeData.errorColor : Colors.transparent;
              return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);



              to be



              TextStyle _getErrorStyle(ThemeData themeData) 
              final Color color = themeData.errorColor;
              return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);






              share|improve this answer

























                0












                0








                0







                I can't imagine that this behavior is intended, I don't know why the disabled field shouldn't show the error message, if it isn't a bug, then the upcoming flutter versions shall provide a readonly or similar property to use in such case



                Any way, for the time being I've edited flutter code to show the disabled field error message



                in the file flutterpackagesflutterlibsrcmaterialinput_decorator.dart



                change the method



                TextStyle _getErrorStyle(ThemeData themeData) 
                final Color color = decoration.enabled? themeData.errorColor : Colors.transparent;
                return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);



                to be



                TextStyle _getErrorStyle(ThemeData themeData) 
                final Color color = themeData.errorColor;
                return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);






                share|improve this answer













                I can't imagine that this behavior is intended, I don't know why the disabled field shouldn't show the error message, if it isn't a bug, then the upcoming flutter versions shall provide a readonly or similar property to use in such case



                Any way, for the time being I've edited flutter code to show the disabled field error message



                in the file flutterpackagesflutterlibsrcmaterialinput_decorator.dart



                change the method



                TextStyle _getErrorStyle(ThemeData themeData) 
                final Color color = decoration.enabled? themeData.errorColor : Colors.transparent;
                return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);



                to be



                TextStyle _getErrorStyle(ThemeData themeData) 
                final Color color = themeData.errorColor;
                return themeData.textTheme.caption.copyWith(color: color).merge(decoration.errorStyle);







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 23 at 12:22









                Mohamed SelimMohamed Selim

                1,7971628




                1,7971628



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f55303323%2fflutter-cant-see-validation-messages-for-disabled-form-fields%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

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript