What is the cleanest way to validate an web site address and username that a user enters that is iOS 2.0 compatible?
i am new iphone developer,any know about this please tell me how to validate web site address and username(username don't allow space,enter k开发者_如何学编程ey ans special characters)
To validate the username, you should use a NSCharacterSet
which only contains the allowed characters and then remove everything from the string which isn't in the set. Web address validating... what is a valid web address?
精彩评论