import { NgModule } from '@angular/core';
import { textinput, TextValidator } from './text';
import { date, DateValidator } from './date';
import { digits, DigitsValidator } from './digits';
import { email, EmailValidator } from './email';
import { number, NumberValidator } from './number';
import { phone, PhoneValidator } from './phone';
import { url, UrlValidator } from './url';


export const CustomValidators: any = {
  date,
  textinput,
  digits,
  email,
  number,
  phone,
  url

};

const CUSTOM_FORM_DIRECTIVES = [
  TextValidator,
  DateValidator,
  DigitsValidator,
  EmailValidator,
  NumberValidator,
  PhoneValidator,
  UrlValidator,
 
];

@NgModule({
  declarations: [CUSTOM_FORM_DIRECTIVES],
  exports: [CUSTOM_FORM_DIRECTIVES]
})
export class CustomFormsModule {
}
