Passport Number validation

One Star

Passport Number validation

Hi,
Passport Number validation ? This should be 8 characters in size and should have 1 number as well as 1 character. My input file is Details.xls and output will be two file ,validePancard.xls containting valid no and other is invalid.xls file having invalid no.
Will you please suggest me which component should i use and how to do that?
Thank you in advance.
One Star

Re: Passport Number validation

Hi abc1224,
Can you share a sample input value?
Thanks
Dwanny
One Star

Re: Passport Number validation

Hi,
valid sample input value are-J8369854 , SJ234567 etc
Invalid sample input value are-45689 , dfghr , 123gh etc.

Thank you
Community Manager

Re: Passport Number validation

Hi
You can use tFilterRow component, all the invalid data are put in the reject flow.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Passport Number validation

Hi,
By using tfilterRow,only character size length(8)problem is solved but how to check that 8 character size strickly consist atleast 1 number as well as 1 character. i.e i want output as J8369854 not 12345678 or abcdefgh .
Thank you.
One Star

Re: Passport Number validation

Hi abc1224,
Please refer to the job that I have mentioned in the below post:
http://www.talendforge.org/forum/viewtopic.php?id=32537
All you will need to do is to modify the regular expression.
Thanks,
Dwanny