Skip to content

Commit b56fca8

Browse files
added: cpf field
1 parent 7b59091 commit b56fca8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

example/lib/great_form.dart

+8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ class GreatForm extends FancyManager {
3737
FancyValidator.notEmpty(value),
3838
],
3939
),
40+
FancyInput(
41+
id: 'cpf',
42+
mask: '###.###.###-##',
43+
rules: (value) => [
44+
FancyValidator.notEmpty(value),
45+
FancyValidator.validCPF(value),
46+
],
47+
),
4048
FancyInput(
4149
id: 'notes',
4250
rules: (value) => [],

example/lib/main.dart

+10
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ class _SimpleFormScreenState extends State<SimpleFormScreen> {
9999
),
100100
maxLines: 4,
101101
),
102+
FancyFormField(
103+
fancyKey: FancyKey(
104+
id: 'cpf',
105+
formManager: greatForm,
106+
),
107+
decoration: InputDecoration(
108+
labelText: 'CPF',
109+
hintText: 'Enter your CPF.',
110+
),
111+
),
102112
SizedBox(
103113
height: 12,
104114
),

0 commit comments

Comments
 (0)