Validate inclusion of document type in allowed document types

* Add custom message for inclusion validation to include the allowed values.
* Force user to choose document_type from select lik the one shown at verification form.
* Convert stored document_type to a human readable text
This commit is contained in:
Senén Rodero Rodríguez
2019-10-17 16:05:40 +02:00
parent a2f5317ae1
commit a150f2161e
11 changed files with 38 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
"document_type","document_number","date_of_birth","postal_code"
,"44556678T","07/08/1984",7008
"DNI",,"07/08/1985",7009
"Passport","22556678T",,7010
"NIE","X11556678","07/08/1987",
"1",,"07/08/1985",7009
"2","22556678T",,7010
"3","X11556678","07/08/1987",
"DNI","Z11556678","07/08/1987",7011
1 document_type document_number date_of_birth postal_code
2 44556678T 07/08/1984 7008
3 DNI 1 07/08/1985 7009
4 Passport 2 22556678T 7010
5 NIE 3 X11556678 07/08/1987
6 DNI Z11556678 07/08/1987 7011

View File

@@ -1,5 +1,5 @@
"document_type","document_number","date_of_birth","postal_code"
"DNI","44556678T","07/08/1984",7008
"DNI","33556678T","07/08/1985",7008
"DNI","22556678T","07/08/1986",7008
"NIE","X11556678","07/08/1987",7008
"1","44556678T","07/08/1984",7008
"1","33556678T","07/08/1985",7008
"1","22556678T","07/08/1986",7008
"2","X11556678","07/08/1987",7008
1 document_type document_number date_of_birth postal_code
2 DNI 1 44556678T 07/08/1984 7008
3 DNI 1 33556678T 07/08/1985 7008
4 DNI 1 22556678T 07/08/1986 7008
5 NIE 2 X11556678 07/08/1987 7008