Merged
Conversation
1a466e5 to
21aceb2
Compare
63 tasks
257e731 to
d9c538b
Compare
| 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') }); |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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'))); |
Contributor
|
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.'), |
f6a5f9f to
75c8f1d
Compare
Contributor
|
@0candy a few nitpick comments. Other than that LGTM. 👍 |
Merged
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connect to https://github.com/strongloop-internal/scrum-loopback/issues/910
Connect to #2422