ios - Objective-C : validating text field with number -


i'm new ios development. want know how can validate text field if contains number specific range, 10 contact number ? there predefined function available ?

thank you.

+ (bool) validatepassword:(nsstring *)password {    nsstring *passwordregex = @"^[a-za-z0-9]{6,20}+$";    nspredicate *passwordpredicate = [nspredicate predicatewithformat:@"self matches %@",passwordregex];    return [passwordpredicate evaluatewithobject:password]; } 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -