default restrict_trim to false for now; except on email and nick
This commit is contained in:
parent
34d8bacf07
commit
fe66d42ba0
1 changed files with 9 additions and 7 deletions
|
|
@ -68,19 +68,21 @@ let map_err_to_invalid_submission ~kind_str f =
|
|||
|
||||
open Config
|
||||
|
||||
let restrict_trim = false
|
||||
|
||||
let subject =
|
||||
make ~max_len:subject_max_length ~min_len:subject_min_length
|
||||
~restrict_char:false ~restrict_trim:true
|
||||
~restrict_char:false ~restrict_trim
|
||||
|> map_err_to_invalid_submission ~kind_str:"subject"
|
||||
|
||||
let comment =
|
||||
make ~max_len:comment_max_length ~min_len:comment_min_length
|
||||
~restrict_char:false ~restrict_trim:true
|
||||
~restrict_char:false ~restrict_trim
|
||||
|> map_err_to_invalid_submission ~kind_str:"comment"
|
||||
|
||||
let report =
|
||||
make ~max_len:report_max_length ~min_len:None ~restrict_char:false
|
||||
~restrict_trim:true
|
||||
~restrict_trim
|
||||
|> map_err_to_invalid_submission ~kind_str:"report"
|
||||
|
||||
let nick =
|
||||
|
|
@ -95,20 +97,20 @@ let email =
|
|||
|
||||
let bio =
|
||||
make ~max_len:biography_max_length ~min_len:None ~restrict_char:false
|
||||
~restrict_trim:false
|
||||
~restrict_trim
|
||||
|> map_err_to_invalid_submission ~kind_str:"biography"
|
||||
|
||||
let password =
|
||||
make ~max_len:password_max_length ~min_len:(Some password_min_length)
|
||||
~restrict_char:false ~restrict_trim:false
|
||||
~restrict_char:false ~restrict_trim
|
||||
|> map_err_to_invalid_submission ~kind_str:"password"
|
||||
|
||||
let image_name =
|
||||
make ~max_len:image_name_max_length ~min_len:None ~restrict_char:false
|
||||
~restrict_trim:true
|
||||
~restrict_trim
|
||||
|> map_err_to_invalid_submission ~kind_str:"image name"
|
||||
|
||||
let image_alt =
|
||||
make ~max_len:image_description_max_length ~min_len:None ~restrict_char:false
|
||||
~restrict_trim:true
|
||||
~restrict_trim
|
||||
|> map_err_to_invalid_submission ~kind_str:"image description"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue