Skip to content

Commit cf50e84

Browse files
committed
Fixed bug where TYPE_TEXT validates as TYPE_EMAIL
1 parent f6bf74a commit cf50e84

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

example/lib/main.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ class MyHomePage extends StatelessWidget {
2929
context,
3030
autovalidate: true,
3131
controls: [
32+
FormBuilderInput.textField(
33+
type: FormBuilderInput.TYPE_TEXT,
34+
attribute: "name",
35+
label: "Name",
36+
require: true,
37+
min: 3,
38+
),
3239
FormBuilderInput.dropdown(
3340
attribute: "dropdown",
3441
require: true,

lib/src/form_builder_input.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import './form_builder_input_option.dart';
77

88
class FormBuilderInput {
99
static const String TYPE_TEXT = "Text";
10-
static const String TYPE_PASSWORD = "Password";
1110
static const String TYPE_NUMBER = "Number";
1211
static const String TYPE_PHONE = "Phone";
13-
static const String TYPE_EMAIL = "Text";
12+
static const String TYPE_EMAIL = "Email";
1413
static const String TYPE_MULTILINE_TEXT = "MultilineText";
14+
static const String TYPE_PASSWORD = "Password";
1515
static const String TYPE_RADIO = "Radio";
1616
static const String TYPE_CHECKBOX_LIST = "CheckboxList";
1717
static const String TYPE_CHECKBOX = "Checkbox";

0 commit comments

Comments
 (0)