Showing
1 changed file
with
7 additions
and
3 deletions
| @@ -177,9 +177,13 @@ export default class Edit extends Component { | @@ -177,9 +177,13 @@ export default class Edit extends Component { | ||
| 177 | } | 177 | } |
| 178 | AlertIOS_input(title, statusName) { | 178 | AlertIOS_input(title, statusName) { |
| 179 | AlertIOS.prompt(title, null, d => { | 179 | AlertIOS.prompt(title, null, d => { |
| 180 | - this.setState({ | 180 | + if (statusName == "phone" && !(/^1[34578]\d{9}$/.test(d))) { |
| 181 | - [statusName]: d | 181 | + Alert.alert("手机号码有误,请重新填写"); |
| 182 | - }); | 182 | + } else { |
| 183 | + this.setState({ | ||
| 184 | + [statusName]: d | ||
| 185 | + }); | ||
| 186 | + } | ||
| 183 | }); | 187 | }); |
| 184 | } | 188 | } |
| 185 | 189 |
-
Please register or login to post a comment