ios - How to check the validation of edit text for pan card in objective c? -


i have validate test valid pan card of regular expression.can 1 out.

i found solution in java , check out below stack
how verify card pan?

you use code:

- (bool)check:(nsstring *)input {    nsstring *pattern = @"^[a-za-z]{5}[0-9]{4}[a-za-z]$"     nsregularexpression *regex = [nsregularexpression regularexpressionwithpattern:pattern options:null error:&error];    nsarray *matches = [regex matchesinstring:input options:nsmatchingprogress range:nsmakerange(0, input.length)];     return matches.length && matches[0].range.location == 0        } 

Comments