Fakultas Ilmu Komputer UI

Commit 7be2e4fc authored by Usman Sidiq's avatar Usman Sidiq
Browse files

[REFACTOR] Implement validator for registration

parent b99c741d
Pipeline #33974 passed with stages
in 1 minute and 41 seconds
......@@ -21,6 +21,7 @@ class RegistrasiState extends State<Registrasi> {
),
body: SingleChildScrollView(
child: Form(
key: _formKey,
child: Center(
child: Container(
margin: EdgeInsets.symmetric(horizontal: 20.0),
......@@ -40,10 +41,12 @@ class RegistrasiState extends State<Registrasi> {
CustomTextField(
title: 'Nama Lengkap',
key: Key('Text Field Nama'),
validator: (input) => input.isEmpty ? "*Wajib diisi" : null,
),
CustomTextField(
title: 'Nomor Telepon',
key: Key('Text Field Nomor Telepon'),
validator: (input) => input.isEmpty ? "*Wajib diisi" : null,
),
CustomTextField(
title: 'Email (Opsional)',
......@@ -52,10 +55,12 @@ class RegistrasiState extends State<Registrasi> {
CustomTextField(
title: 'Password',
key: Key('Text Field Password'),
validator: (input) => input.isEmpty ? "*Wajib diisi" : null,
),
CustomTextField(
title: 'Konfirmasi Password',
key: Key('Text Field Konfirmasi Password'),
validator: (input) => input.isEmpty ? "*Wajib diisi" : null,
),
Container(
margin: EdgeInsets.fromLTRB(0, 30, 0, 10),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment