【发布时间】:2015-05-19 13:08:25
【问题描述】:
我面临一个小问题,即如何验证 uitextfiled 中的金额值。我提交的文本数量限制应大于 10 卢比,值之间的范围为 99999 卢比。如果用户输入无效金额,如 Rs.01,02,04,09,应避免使用此类数字
我刚刚做了简单的方法来调用我的函数:
if ([amount.text length]>=2 && [amount.text length]<=5) {
}else{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"error" message:@"Plz enter the amout Min 10Rs" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alert show];
return;
}
【问题讨论】:
标签: ios objective-c iphone uitextfield