mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge pull request #1279 from mewtaylor/issue/gh-1278
Fix GH-1278: Use birthOffset for age check
This commit is contained in:
commit
f511035450
1 changed files with 2 additions and 2 deletions
|
@ -338,9 +338,9 @@ module.exports = {
|
|||
formData.user.birth.month - 1,
|
||||
1
|
||||
);
|
||||
if (((Date.now() - birthdate) / (24*3600*1000*365.25)) < 13) {
|
||||
if (((Date.now() - birthdate) / (24*3600*1000*365.25)) < this.props.birthOffset) {
|
||||
return invalidate({
|
||||
'user.birth.month': this.props.intl.formatMessage({id: 'teacherRegistration.validationAge'})
|
||||
'user.birth.year': this.props.intl.formatMessage({id: 'teacherRegistration.validationAge'})
|
||||
});
|
||||
}
|
||||
return this.props.onNextStep(formData);
|
||||
|
|
Loading…
Reference in a new issue