-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear Invalid Filename Error Message #280
Clear Invalid Filename Error Message #280
Conversation
c1acab7
to
4e61a28
Compare
Codecov Report
@@ Coverage Diff @@
## master #280 +/- ##
========================================
+ Coverage 81.19% 81.3% +0.1%
========================================
Files 23 23
Lines 3106 3108 +2
Branches 729 729
========================================
+ Hits 2522 2527 +5
+ Misses 450 448 -2
+ Partials 134 133 -1
Continue to review full report at Codecov.
|
31f8375
to
94d1656
Compare
Signed-off-by: Lincoln Simba <[email protected]>
pyxform/survey_element.py
Outdated
" include numbers, dashes, and periods." % self.name | ||
invalid_char = re.search(INVALID_XFORM_TAG_REGEXP, self.name) | ||
msg = "Invalid name. Remove '{}' from '{}'".format( | ||
invalid_char.group(0), self.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's retain a bit of the original message, but show the offending characters. For example, The name 'badfile@name' is an invalid XML tag, it contains invalid character(s) '@'. Names must begin with a letter, colon, or underscore, subsequent characters can include numbers, dashes, and periods.
Signed-off-by: Lincoln Simba <[email protected]>
9f5fc1c
to
f4728bf
Compare
Provide a clear error message. State exact error, if a filename is invalid.
Fixes #22