Validating a datafile with the datatypes

I have two input files 1)datafile 2)metadata file.

I have a metadata file like:

field1datatypeformat1number2string3dateyy-mm-dd

I have a data file like:

1234abc12-8-16 xyz234512-9-163456acd14-08-12

In the first row there is no correction as everything is inline with the metadata.

In the second row,the first field is string instead of number.So I shoud get error for the corresponding row in field 1.

In the third row,the date format should be yy-mm-dd ,but here it is 14-08-12 .the year cannot be 14.It shuold throw error for the corresponding field.

I need a unix shell script for validating .

Could anyone please help me in this regard?

Thanks in advance
KVB

please provide the sample data with desired output

metadata:

field1  datatype  format
1        number    
2        string  
3        date        yy-mm-dd

data file:

1234  abc  12-08-16
xyz   2345 12-08-16  (this row should get error bcoz the first field should be number)
3456  acd  12-14-08  (error should be thrown bcoz it's invalid date '14 is invalid month)
awk '{if($1 ~ /[0-9]/){f1=1}else{print "field one not num";next};if($2 ~ /[a-z]|[A-Z]/){f1=1}else{f1=0};if(f1==1){print}
}' datafile

like this output you need.
Here right now i am not considering for date validation.
aND ALSO for date validation no. of days in month to be consider