-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for AR (generic) (#52)
Please note that AR has multiple sub-genres, but this should work for a generic variation of this form.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import '../locale.dart'; | ||
|
||
class LocaleAr implements FormValidatorLocale { | ||
const LocaleAr(); | ||
|
||
@override | ||
String name() => 'ar'; | ||
|
||
@override | ||
String minLength(String v, int n) => | ||
'يجب أن يكون عدد الأحرف على الأقل $n حروف'; | ||
|
||
@override | ||
String maxLength(String v, int n) => | ||
'يجب أن لا يزيد عدد الأحرف عن $n حرف'; | ||
|
||
|
||
@override | ||
String email(String v) => 'برجاء إدخال عنوان بريد إلكتروني صحيح'; | ||
|
||
@override | ||
String phoneNumber(String v) => 'برجاء إدخال رقم هاتف صحيح'; | ||
|
||
@override | ||
String required() => 'برجاء ملء هذه الخانة'; | ||
|
||
@override | ||
String ip(String v) => 'برجاء إدخال عنوان IP صحيح'; | ||
|
||
@override | ||
String ipv6(String v) => 'برجاء إدخال عنوان IPv6 صحيح'; | ||
|
||
@override | ||
String url(String v) => 'برجاء إدخال عنوان URL صحيح'; | ||
} |