Commit f11e024d authored by rizky ramadhan's avatar rizky ramadhan

validate

parent c07c7e6f
...@@ -119,6 +119,7 @@ class ContactUs2 extends StatelessWidget { ...@@ -119,6 +119,7 @@ class ContactUs2 extends StatelessWidget {
hintText: "Enter your Name", hintText: "Enter your Name",
fillColor: Colors.white, fillColor: Colors.white,
filled: true, filled: true,
errorStyle: TextStyle(color: Colors.white),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: BorderSide(width: 1, color: Colors.white), borderSide: BorderSide(width: 1, color: Colors.white),
...@@ -130,7 +131,7 @@ class ContactUs2 extends StatelessWidget { ...@@ -130,7 +131,7 @@ class ContactUs2 extends StatelessWidget {
), ),
validator: (value) { validator: (value) {
if (value == null || value.isEmpty) { if (value == null || value.isEmpty) {
return 'Name cannot be empty!!!'; return 'Please enter your name';
} }
return null; return null;
}, },
...@@ -170,6 +171,7 @@ class ContactUs2 extends StatelessWidget { ...@@ -170,6 +171,7 @@ class ContactUs2 extends StatelessWidget {
hintText: "Enter a valid phone number", hintText: "Enter a valid phone number",
fillColor: Colors.white, fillColor: Colors.white,
filled: true, filled: true,
errorStyle: TextStyle(color: Colors.white),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
...@@ -182,11 +184,11 @@ class ContactUs2 extends StatelessWidget { ...@@ -182,11 +184,11 @@ class ContactUs2 extends StatelessWidget {
), ),
), ),
validator: (value) { validator: (value) {
if (value == null || value.isEmpty) { if (value == null || value.isEmpty) {
return 'Phone cannot be empty!!!'; return 'Please enter your phone number';
} }
return null; return null;
}, },
), ),
), ),
const SizedBox( const SizedBox(
...@@ -200,6 +202,7 @@ class ContactUs2 extends StatelessWidget { ...@@ -200,6 +202,7 @@ class ContactUs2 extends StatelessWidget {
hintText: "Enter a valid email address", hintText: "Enter a valid email address",
fillColor: Colors.white, fillColor: Colors.white,
filled: true, filled: true,
errorStyle: TextStyle(color: Colors.white),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
...@@ -212,11 +215,11 @@ class ContactUs2 extends StatelessWidget { ...@@ -212,11 +215,11 @@ class ContactUs2 extends StatelessWidget {
), ),
), ),
validator: (value) { validator: (value) {
if (value == null || value.isEmpty) { if (value == null || value.isEmpty) {
return 'Email cannot be empty!!!'; return 'Please enter your email';
} }
return null; return null;
}, },
), ),
), ),
const SizedBox( const SizedBox(
...@@ -243,6 +246,7 @@ class ContactUs2 extends StatelessWidget { ...@@ -243,6 +246,7 @@ class ContactUs2 extends StatelessWidget {
hintText: "Enter your message", hintText: "Enter your message",
fillColor: Colors.white, fillColor: Colors.white,
filled: true, filled: true,
errorStyle: TextStyle(color: Colors.white),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: BorderSide(width: 1, color: Colors.white), borderSide: BorderSide(width: 1, color: Colors.white),
...@@ -255,7 +259,7 @@ class ContactUs2 extends StatelessWidget { ...@@ -255,7 +259,7 @@ class ContactUs2 extends StatelessWidget {
maxLines: 5, maxLines: 5,
validator: (value) { validator: (value) {
if (value == null || value.isEmpty) { if (value == null || value.isEmpty) {
return 'Message cannot be empty!!!'; return 'Please enter your message';
} }
return null; return null;
}, },
......
Markdown is supported
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