mirror of
https://github.com/valitydev/checkout.git
synced 2024-11-06 10:35:20 +00:00
Remove email validator (#67)
This commit is contained in:
parent
367a23a77c
commit
8570bc2a20
@ -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);
|
||||
|
@ -163,7 +163,7 @@
|
||||
"Venuspoint": {
|
||||
"name": "Venus Point",
|
||||
"fields": {
|
||||
"account": "Account (email)",
|
||||
"account": "Account",
|
||||
"password": "Account password"
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +163,7 @@
|
||||
"Venuspoint": {
|
||||
"name": "Venus Point",
|
||||
"fields": {
|
||||
"account": "アカウント (メールアドレス)",
|
||||
"account": "アカウント",
|
||||
"password": "パスワード"
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +163,7 @@
|
||||
"Venuspoint": {
|
||||
"name": "Venus Point",
|
||||
"fields": {
|
||||
"account": "Account (email)",
|
||||
"account": "Account",
|
||||
"password": "Account password"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user