Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(995)

Issue 57290044: Correct a small error in the regex used for name validation

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by Oo Theong Siang
Modified:
10 years, 9 months ago
Reviewers:
damith
Visibility:
Public.

Description

Correct a small error in the regex used for name validation

Patch Set 1 #

Total comments: 3

Patch Set 2 : Issue 1585: Correct a small error in the regex used for name validation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -1 line) Patch
M src/main/java/teammates/common/util/FieldValidator.java View 1 chunk +1 line, -1 line 0 comments Download
M src/test/java/teammates/test/cases/common/FieldValidatorTest.java View 1 4 chunks +27 lines, -0 lines 0 comments Download

Messages

Total messages: 5
damith
https://codereview.appspot.com/57290044/diff/1/src/main/java/teammates/common/util/FieldValidator.java File src/main/java/teammates/common/util/FieldValidator.java (right): https://codereview.appspot.com/57290044/diff/1/src/main/java/teammates/common/util/FieldValidator.java#newcode267 src/main/java/teammates/common/util/FieldValidator.java:267: private static final String REGEX_NAME = "^[\\p{IsL}\\p{IsN}][^|%]*+$"; How come ...
10 years, 9 months ago (2014-02-05 09:37:39 UTC) #1
Oo Theong Siang
https://codereview.appspot.com/57290044/diff/1/src/main/java/teammates/common/util/FieldValidator.java File src/main/java/teammates/common/util/FieldValidator.java (right): https://codereview.appspot.com/57290044/diff/1/src/main/java/teammates/common/util/FieldValidator.java#newcode267 src/main/java/teammates/common/util/FieldValidator.java:267: private static final String REGEX_NAME = "^[\\p{IsL}\\p{IsN}][^|%]*+$"; Actually the ...
10 years, 9 months ago (2014-02-05 09:48:09 UTC) #2
damith
On 2014/02/05 09:48:09, Oo Theong Siang wrote: > https://codereview.appspot.com/57290044/diff/1/src/main/java/teammates/common/util/FieldValidator.java > File src/main/java/teammates/common/util/FieldValidator.java (right): > > ...
10 years, 9 months ago (2014-02-05 09:52:31 UTC) #3
Oo Theong Siang
On 2014/02/05 09:52:31, damith wrote: > On 2014/02/05 09:48:09, Oo Theong Siang wrote: > > ...
10 years, 9 months ago (2014-02-05 10:24:19 UTC) #4
damith
10 years, 9 months ago (2014-02-05 10:35:41 UTC) #5
https://codereview.appspot.com/57290044/diff/1/src/main/java/teammates/common...
File src/main/java/teammates/common/util/FieldValidator.java (right):

https://codereview.appspot.com/57290044/diff/1/src/main/java/teammates/common...
src/main/java/teammates/common/util/FieldValidator.java:267: private static
final String REGEX_NAME = "^[\\p{IsL}\\p{IsN}][^|%]*+$";
write a test case just to check the regex. It could have code like this.
e.g.
assertTrue(isRegexMatching(regex, "matchingString");
assertFalse(isRegexMatching(regex, "nonMatchingString");
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b