-
How to validate form before submit and show message if fail for form with NyTextField |
Beta Was this translation helpful? Give feedback.
Answered by
agordn52
Jun 30, 2023
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
agordn52
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @letieu,
You can do the below:
Read the docs here to learn more.