File tree 2 files changed +36
-2
lines changed
2 files changed +36
-2
lines changed Original file line number Diff line number Diff line change
1
+ import 'package:form_validator/src/i18n/pl.dart' ;
2
+
1
3
import '../form_validator_locale.dart' ;
2
4
import 'az.dart' ;
3
5
import 'de.dart' ;
@@ -32,6 +34,9 @@ FormValidatorLocale createLocale(String locale) {
32
34
case 'pt-br' :
33
35
return LocalePtBr ();
34
36
37
+ case 'pl' :
38
+ return LocalePl ();
39
+
35
40
case 'zh-CN' :
36
41
return LocaleZhCN ();
37
42
@@ -40,7 +45,6 @@ FormValidatorLocale createLocale(String locale) {
40
45
return LocaleEn ();
41
46
42
47
default :
43
- throw ArgumentError .value (
44
- locale, 'locale' , 'Form validation locale is not available.' );
48
+ throw ArgumentError .value (locale, 'locale' , 'Form validation locale is not available.' );
45
49
}
46
50
}
Original file line number Diff line number Diff line change
1
+ import '../form_validator_locale.dart' ;
2
+
3
+ class LocalePl extends FormValidatorLocale {
4
+ @override
5
+ String name () => 'pl' ;
6
+
7
+ @override
8
+ String minLength (String v, int n) => 'Minimalna ilość znaków to $n ' ;
9
+
10
+ @override
11
+ String maxLength (String v, int n) => 'Maksymalna ilość znaków to $n ' ;
12
+
13
+ @override
14
+ String email (String v) => 'Adres Email jest niepoprawny' ;
15
+
16
+ @override
17
+ String phoneNumber (String v) => 'Numer telefonu jest niepoprawny' ;
18
+
19
+ @override
20
+ String required () => 'To pole jest wymagane' ;
21
+
22
+ @override
23
+ String ip (String v) => 'adres IP jest niepoprawny' ;
24
+
25
+ @override
26
+ String ipv6 (String v) => 'adres IPv6 jest niepoprawny' ;
27
+
28
+ @override
29
+ String url (String v) => 'adres URL jest niepoprawny' ;
30
+ }
You can’t perform that action at this time.
0 commit comments