Skip to content

Commit 1acc81e

Browse files
committed
Typo fixes
1 parent 2224a56 commit 1acc81e

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

backend/api/src/setup/helpers/validation.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ function isEmpty({ value }) {
1010
return !value
1111
}
1212

13+
function isNotEmpty({ value }) {
14+
return !!value
15+
}
16+
1317
// Equal
1418
export function isEqual({ value1, value2 }) {
1519
return value1 === value2
@@ -35,6 +39,7 @@ export default function validate(validations = []) {
3539
const checks = {
3640
email: isEmail,
3741
empty: isEmpty,
42+
notEmpty: isNotEmpty,
3843
equal: isEqual,
3944
length: isLength,
4045
lengthMin: isLengthMin,

frontend/app/mobile/src/modules/user/Signup/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ class Signup extends PureComponent {
3030
name: '',
3131
email: '',
3232
password: '',
33-
passwordRetype: ''
33+
passwordRepeat: ''
3434
}
3535

3636
onSubmit = async () => {
3737
const { signup, setUser, messageShow } = this.props
38-
const { name, email, password, passwordRetype } = this.state
38+
const { name, email, password, passwordRepeat } = this.state
3939

4040
this.isSubmittingToggle(true)
4141

4242
try {
43-
const { data } = await signup({ name, email, password, passwordRetype })
43+
const { data } = await signup({ name, email, password, passwordRepeat })
4444

4545
this.isSubmittingToggle(false)
4646

@@ -75,7 +75,7 @@ class Signup extends PureComponent {
7575
}
7676

7777
render() {
78-
const { isSubmitting, name, email, password, passwordRetype } = this.state
78+
const { isSubmitting, name, email, password, passwordRepeat } = this.state
7979

8080
return (
8181
<Body fullscreen={true}>
@@ -136,12 +136,12 @@ class Signup extends PureComponent {
136136
{/* Retype password */}
137137
<InputText
138138
inputRef={input => this.inputPasswordRetype = input}
139-
placeholder={translate.t('user.fields.passwordRetype').toUpperCase()}
139+
placeholder={translate.t('user.fields.passwordRepeat').toUpperCase()}
140140
secureTextEntry={true}
141141
autoCapitalize={'none'}
142142
returnKeyType={'next'}
143-
value={passwordRetype}
144-
onChangeText={passwordRetype => this.setState({ passwordRetype })}
143+
value={passwordRepeat}
144+
onChangeText={passwordRepeat => this.setState({ passwordRepeat })}
145145
blurOnSubmit={false}
146146
onSubmitEditing={this.onSubmit}
147147
/>

frontend/app/mobile/src/modules/user/api/actions/mutation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { API_URL } from '../../../../setup/config/env'
77
// Actions
88

99
// Signup
10-
export function signup({ name, email, password, passwordRetype }) {
10+
export function signup({ name, email, password, passwordRepeat }) {
1111
return dispatch => {
1212
return axios.post(API_URL, {
1313
operation: 'userSignup',
14-
params: { name, email, password, passwordRetype }
14+
params: { name, email, password, passwordRepeat }
1515
})
1616
}
1717
}

frontend/app/mobile/src/modules/user/translations/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"emailPlaceholder": "Enter your email",
88
"password": "Password",
99
"passwordPlaceholder": "Enter your password",
10-
"passwordRetype": "Retype Password",
11-
"passwordRetypePlaceholder": "Retype your password"
10+
"passwordRepeat": "Retype Password",
11+
"passwordRepeatPlaceholder": "Retype your password"
1212
},
1313

1414
"start": {

0 commit comments

Comments
 (0)