Commit 00dff2ee authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

Menambahkan validasi di change email

parent 8ad222c1
...@@ -228,5 +228,6 @@ ...@@ -228,5 +228,6 @@
"alerConfirmNewPassword": "Password confirmation field is required!", "alerConfirmNewPassword": "Password confirmation field is required!",
"alertLabelAddress": "Label field is required", "alertLabelAddress": "Label field is required",
"alertDetailAddress": "Detail field is required", "alertDetailAddress": "Detail field is required",
"alertVoucher":"Voucher cannot be used with point" "alertVoucher":"Voucher cannot be used with point",
"alertemailblank":"Email cannot be empty"
} }
\ No newline at end of file
...@@ -228,5 +228,6 @@ ...@@ -228,5 +228,6 @@
"alerConfirmNewPassword": "Konfirmasi password harus diisi!", "alerConfirmNewPassword": "Konfirmasi password harus diisi!",
"alertLabelAddress": "Nama alamat harus diisi!", "alertLabelAddress": "Nama alamat harus diisi!",
"alertDetailAddress": "Detail alamat harus diisi!", "alertDetailAddress": "Detail alamat harus diisi!",
"alertVoucher":"Voucher tidak bisa digunakan dengan point" "alertVoucher":"Voucher tidak bisa digunakan dengan point",
"alertemailblank":"Email tidak boleh kosong"
} }
\ No newline at end of file
...@@ -19,6 +19,9 @@ class ChangeEmail extends React.Component { ...@@ -19,6 +19,9 @@ class ChangeEmail extends React.Component {
} }
changeEmail() { changeEmail() {
if (this.state.email=="") {
Alert.alert("",i18n.t('alertemailblank'));
} else {
this.setState({ this.setState({
spinner: true, spinner: true,
}) })
...@@ -40,6 +43,7 @@ class ChangeEmail extends React.Component { ...@@ -40,6 +43,7 @@ class ChangeEmail extends React.Component {
this.props.setChangeEmail(loginProps) this.props.setChangeEmail(loginProps)
this.props.setEmailConfirm(emailConfirmProps) this.props.setEmailConfirm(emailConfirmProps)
Alert.alert( Alert.alert(
'', '',
i18n.t('alertCheckEmail'), i18n.t('alertCheckEmail'),
...@@ -70,6 +74,8 @@ class ChangeEmail extends React.Component { ...@@ -70,6 +74,8 @@ class ChangeEmail extends React.Component {
}) })
} }
}
render() { render() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment