Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@0candy
Copy link
Contributor

@0candy 0candy commented Jun 7, 2016

@0candy 0candy added the #review label Jun 7, 2016
@0candy 0candy force-pushed the initialize_glob branch 4 times, most recently from 1a466e5 to 21aceb2 Compare June 8, 2016 21:01
@0candy 0candy self-assigned this Jun 8, 2016
@0candy 0candy force-pushed the initialize_glob branch 3 times, most recently from 257e731 to d9c538b Compare June 10, 2016 19:35
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;

UserModel.validatesFormatOf('email', { with: re, message: 'Must provide a valid email' });
UserModel.validatesFormatOf('email', { with: re, message: g.f('Must provide a valid email') });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regexp is one of the challenges for globalization. In short, it does not work because the word order in sentences varies from language to language. This case requires careful refactoring.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message option is just the error string returned if the regex fails, it is not part of the regex.

});
} else {
fn(new Error('must specify an id or data'));
fn(new Error(g.f('must specify an id or data')));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{id}}

@loay
Copy link
Contributor

loay commented Aug 4, 2016

LGTM


setRemoting(PersistedModel, 'findById', {
description: 'Find a model instance by id from the data source.',
description: g.f('Find a model instance by id from the data source.'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{id}}

@0candy 0candy force-pushed the initialize_glob branch 2 times, most recently from f6a5f9f to 75c8f1d Compare August 4, 2016 19:07
@jannyHou
Copy link
Contributor

jannyHou commented Aug 4, 2016

@0candy a few nitpick comments. Other than that LGTM. 👍

@0candy 0candy merged commit 1c1f2c2 into master Aug 4, 2016
@0candy 0candy removed the #review label Aug 4, 2016
@0candy 0candy deleted the initialize_glob branch August 4, 2016 20:33
0candy added a commit that referenced this pull request Aug 4, 2016
@0candy 0candy mentioned this pull request Aug 4, 2016
0candy added a commit that referenced this pull request Aug 4, 2016
0candy added a commit that referenced this pull request Aug 4, 2016
0candy added a commit that referenced this pull request Aug 5, 2016
0candy added a commit that referenced this pull request Aug 5, 2016
0candy added a commit that referenced this pull request Aug 5, 2016
0candy added a commit that referenced this pull request Aug 5, 2016
0candy added a commit that referenced this pull request Aug 5, 2016
0candy added a commit that referenced this pull request Aug 5, 2016
0candy added a commit that referenced this pull request Aug 5, 2016
0candy added a commit that referenced this pull request Aug 5, 2016
bajtos added a commit that referenced this pull request Aug 16, 2016
 * Revert globalization of Swagger descriptions (Miroslav Bajtoš)
 * Expose `Replace*` methods (Amir Jafarian)
 * Add bcrypt validation (Loay)
 * Cache remoting descriptions to speed up tests (Miroslav Bajtoš)
 * Revert globalization of assert() messages (Miroslav Bajtoš)
 * Fix token middleware to not trigger CLS init (Miroslav Bajtoš)
 * common: add KeyValueModel (Miroslav Bajtoš)
 * Globalize current-context deprecation messages (Miroslav Bajtoš)
 * Deprecate current-context API (Miroslav Bajtoš)
 * test: increase timeout to prevent CI failures (Miroslav Bajtoš)
 * Backport of #2407 (Candy)
 * test: fix timeout in rest.middleware.test (Miroslav Bajtoš)
 * test: fix "socket hang up" error in app.test (Miroslav Bajtoš)
 * test: increate timeout in Role test (Miroslav Bajtoš)
 * test: make status test more robust (Miroslav Bajtoš)
 * test: fix broken Role tests (Miroslav Bajtoš)
 * Update dependencies to their latest versions (Miroslav Bajtoš)
 * Increase timeout (jannyHou)
 * Backport of #2565 (Miroslav Bajtoš)
 * Avoid calling deprecated methds (Amir Jafarian)
 * test: use local registry in test fixtures (Miroslav Bajtoš)
 * Fix test case error (Loay)
 * Backport/Fix security issue 580 (Loay)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants