Showing
1 changed file
with
4 additions
and
0 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 | + if (statusName == "phone" && !(/^1[34578]\d{9}$/.test(d))) { | ||
| 181 | + Alert.alert("手机号码有误,请重新填写"); | ||
| 182 | + } else { | ||
| 180 | this.setState({ | 183 | this.setState({ |
| 181 | [statusName]: d | 184 | [statusName]: d |
| 182 | }); | 185 | }); |
| 186 | + } | ||
| 183 | }); | 187 | }); |
| 184 | } | 188 | } |
| 185 | 189 |
-
Please register or login to post a comment