0.0.5 • Published 6 years ago

phone-check-egypt v0.0.5

Weekly downloads
20
License
-
Repository
-
Last release
6 years ago

what is it

its a directive that gibe validation on mobile number using regex format ..

directive requirements :

1-angular 4+ 2-bootstrap 4

You need to import module ..

import {OnlyNumberDirective} from 'phone-check-egypt';

   declarations: [
    AppComponent,OnlyNumberDirective
  ]

and then you only need to

  • give the form name and the reference ..
<form #f="ngForm" (ngSubmit)="save()" >
  • add max length of the mobile number and the directive name ..
<input type="text" OnlyNumber max="11" [formData]="f" class="form-control" name="phone"  required>

Why to use this package

  • you don't need to put validation on mobile number

Input Attributes

Attributerequired
requiredoptional
maxRequired (to get the the length of the mobile number)
formDatagive the form refrence to make the form invalid
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago