Remove email validator (#67)

This commit is contained in:
Ildar Galeev 2022-03-23 17:31:57 +03:00 committed by GitHub
parent 367a23a77c
commit 8570bc2a20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 8 deletions

View File

@ -3,19 +3,18 @@ import { connect } from 'react-redux';
import { Field } from 'redux-form';
import { KnownDigitalWalletProviders, State } from 'checkout/state';
import { formatEmail, validateEmail } from 'checkout/utils';
import { CustomInputProps, getCustomInput } from './get-custom-input';
const validateAccount = (value: string): boolean => !value || !value.trim();
const VenusPointAccountDef: React.FC<CustomInputProps> = (props) => (
<Field name="venusPointAccount" component={getCustomInput.bind(null, props)} validate={validateEmail} />
<Field name="venusPointAccount" component={getCustomInput.bind(null, props)} validate={validateAccount} />
);
const mapStateToProps = (state: State) => ({
id: 'venus-point-account-input',
placeholder: state.config.locale['digital.wallet.providers'][KnownDigitalWalletProviders.Venuspoint].fields.account,
type: 'email',
onInput: formatEmail,
autocomplete: 'email'
type: 'text'
});
export const VenusPointAccount = connect(mapStateToProps)(VenusPointAccountDef);

View File

@ -163,7 +163,7 @@
"Venuspoint": {
"name": "Venus Point",
"fields": {
"account": "Account (email)",
"account": "Account",
"password": "Account password"
}
}

View File

@ -163,7 +163,7 @@
"Venuspoint": {
"name": "Venus Point",
"fields": {
"account": "アカウント (メールアドレス)",
"account": "アカウント",
"password": "パスワード"
}
}

View File

@ -163,7 +163,7 @@
"Venuspoint": {
"name": "Venus Point",
"fields": {
"account": "Account (email)",
"account": "Account",
"password": "Account password"
}
}