Created
February 28, 2019 01:18
-
-
Save camilogiraldo/e7e727f56755ddeb6903931210d21615 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Create this file under app/shared/mock/mock-data.ts | |
import { FormData } from './../interface/form-data'; | |
export const MockForm: FormData[] = [ | |
{ | |
controlName: 'Username', | |
controlType: 'text', | |
valueType: 'text', | |
placeholder: 'Enter username', | |
validators: { | |
required: true, | |
minlength: 5 | |
} | |
}, | |
{ | |
controlName: 'Telephone', | |
placeholder: 'Enter Phone', | |
valueType: 'tel', | |
controlType: 'text', | |
validators: { | |
required: true, | |
minlength: 7, | |
maxlength: 10 | |
} | |
}, | |
{ | |
controlName: 'Email', | |
valueType: 'email', | |
placeholder: 'Enter email', | |
controlType: 'text', | |
validators: { | |
required: true | |
} | |
}, | |
{ | |
controlName: 'Gender', | |
placeholder: 'Select gender', | |
controlType: 'select', | |
options: [{ | |
optionName: 'Male', | |
value: 'male' | |
}, { | |
optionName: 'Female', | |
value: 'female' | |
}], | |
validators: { | |
required: true | |
} | |
}, | |
{ | |
controlName: 'Vehicle you own', | |
placeholder: 'Select vehicle', | |
controlType: 'radio', | |
options: [{ | |
optionName: 'I have a bike', | |
value: 'bike' | |
}, { | |
optionName: 'I have a car', | |
value: 'car' | |
}], | |
validators: { | |
required: true | |
} | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment