注册页面上出现小写错误

时间:2016-06-05 22:23:23

标签: ios objective-c

您好,我的生活中我无法弄清楚为什么我在注册过程中遇到以下错误。附件是我在用户名文本字段中输入大写字母时出现此错误的图片。

Screen Shot

呼叫注册功能:

impl<T: Add<U>, U> Add<Complex<U>> for Complex<T> {
    type Output = Complex<<T as Add<U>>::Output>;

    fn add(self, other: Complex<U>) -> Self::Output {
        Complex { re: self.re + other.re, im: self.im + other.im }
    }
}

注册详情

- (void)signUpCode {

NSString *str = @"09";

str = [_firstNameField.text isEqualToString:@""]?@"Please provide firstname":[_lastNameField.text isEqualToString:@""]?@"Please provide lastname":[_usernameField.text isEqualToString:@""]?@"Please provide username":[_emailField.text isEqualToString:@""]?@"Please provide email":[_passwordField.text isEqualToString:@""]?@"Please provide password":@"";
if ([_passwordField.text isEqualToString:_repeatPasswordField.text]) {

}

else

{
    UIAlertView *alt = [[UIAlertView alloc]initWithTitle:@"work" message:@"Password doesn't match." delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil];
    [alt show];
}

if ([str isEqualToString:@""])
{
    NSDictionary *dict =[[NSDictionary alloc] initWithObjectsAndKeys:_firstNameField.text,@"firstname",_lastNameField.text,@"lastname",_usernameField.text,@"username",_emailField.text,@"email",_passwordField.text,@"password", nil];

    [blkRkMngr signup:dict completionBlock:^(BOOL success){
        if (success) {
            // Go to main menu
            [self performSegueWithIdentifier:@"showMenu" sender:self];
        }
        else{

        }
    }];

}

else{
    UIAlertView *alt = [[UIAlertView alloc]initWithTitle:@"LoginApp" message:str delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil];
    [alt show];
}
}

这很奇怪,因为我在整个代码中到处搜索,我找不到“用户名必须只包含小写字母和数字”的错误框语句。

1 个答案:

答案 0 :(得分:1)

您找不到"Username must contains only small letters and numbers"错误消息,因为它来自HTTP请求并显示在UIAlertView中。

只需检查您请求的代码,并找出发生错误的原因。