Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martin Dinov
POD
Commits
f98a8290
Commit
f98a8290
authored
5 years ago
by
Bijun Li
Browse files
Options
Download
Email Patches
Plain Diff
Update for merge
parent
61d3a9ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/internal_api.rs
+2
-3
src/internal_api.rs
with
2 additions
and
3 deletions
+2
-3
src/internal_api.rs
+
2
-
3
View file @
f98a8290
...
...
@@ -17,10 +17,9 @@ use serde_json::Value;
use
std
::
str
;
use
warp
::
http
::
status
::
StatusCode
;
/// Validate field name.
/// Field name is valid only if it contains less than 18 characters and
/// Field name is valid only if it contains less than or equal to 18 characters and
/// characters from 'a' to 'z', 'A' to 'Z'.
fn
field_name
_validator
(
field
:
&
str
)
->
Result
<
()
>
{
fn
validate_
field_name
(
field
:
&
str
)
->
Result
<
()
>
{
lazy_static!
{
static
ref
FIELD_RE
:
Regex
=
Regex
::
new
(
r"^[a-zA-Z]{1,18}$"
)
.expect
(
"Cannot create regex"
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets