Skip to content

How to show validate message in NyTextField when submit form #57

Closed Answered by agordn52
letieu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @letieu,

You can do the below:

TextEditingController _textEditingController = TextEditingController();
  
@override
Widget build(BuildContext context) {
  return Scaffold(
    body: SafeArea(
       child: Container(
         child: NyTextField(
             controller: _textEditingController, 
             validationRules: "not_empty|postcode_uk",
             validationErrorMessage: "Data is not valid"
         ),
       ),
    ),
  );
}

Read the docs here to learn more.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by agordn52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants