Created
September 1, 2022 13:31
-
-
Save anartzdev/74a407f53e3760d6c42d5b4d01f479d9 to your computer and use it in GitHub Desktop.
Configuración formulario
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
{ | |
"controls": [ | |
{ | |
"name": "firstName", | |
"label": "First name:", | |
"value": "", | |
"type": "text", | |
"validators": { | |
"required": true, | |
"minLength": 10 | |
}, | |
"validatorsMessage": { | |
"required": "Es necesario que añadamos el nombre", | |
"minLength": "El nombre tiene que tener mínimo 10 carácteres" | |
} | |
}, | |
{ | |
"name": "lastName", | |
"label": "Last name:", | |
"value": "", | |
"type": "text", | |
"validators": {} | |
}, | |
{ | |
"name": "phone", | |
"label": "Teléfono:", | |
"value": "999999999", | |
"type": "number", | |
"validators": { | |
"required": true, | |
"maxLength": 9 | |
}, | |
"validatorsMessage": { | |
"required": "Es necesario que añadamos el teléfono", | |
"maxLength": "Máximo 9 números" | |
} | |
}, | |
{ | |
"name": "comments", | |
"label": "Comments", | |
"value": "", | |
"type": "textarea", | |
"extraData": { | |
"textAreaOptions": { | |
"rows": 6, | |
"cols": 50 | |
} | |
}, | |
"validators": { | |
"required": true | |
}, | |
"validatorsMessage": { | |
"required": "Es necesario que añadamos un comentario" | |
} | |
}, | |
{ | |
"name": "animal", | |
"label": "Favorite animal", | |
"value": "", | |
"type": "dropdown", | |
"extraData": { | |
"listValues": [ | |
{ | |
"value": "cat", | |
"label": "Cat" | |
}, | |
{ | |
"value": "dog", | |
"label": "Dog" | |
} | |
] | |
}, | |
"validators": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment