Natively Pronounced Mandarin
    Have ideas to improve npm?Join in the discussion! »

    phone-check-egypt
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.5 • Public • Published

    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

    Attribute required
    required optional
    max Required (to get the the length of the mobile number)
    [formData] give the form refrence to make the form invalid

    Install

    npm i phone-check-egypt

    DownloadsWeekly Downloads

    6

    Version

    0.0.5

    License

    none

    Unpacked Size

    114 kB

    Total Files

    30

    Last publish

    Collaborators

    • avatar