Notification texts go here Contact Us Buy Now!

Multiline string for TextFormString validator

Enhance the clarity of your TextFormFiled's error messages by allowing multiline text. By setting errorMaxLines: 2 within the InputDecoration, you enable the error label to span multiple lines, providing ample space for detailed explanations.

Implement this feature with ease:

``` TextFormField( decoration: const InputDecoration( icon: Icon(Icons.person), hintText: 'What do people call you?', labelText: 'Name *', errorMaxLines: 2 ), validator: (String value) { return value.contains('@') ? 'Do not use the @ char. Do not use the @ char. Do not use the @ char. Do not use the @ char.' : null; }, ), ```

This example demonstrates how multiple lines enhance error message clarity. Please note that obscureText: true has been intentionally omitted to showcase the multiline error message functionality.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.