better empty regex
This commit is contained in:
parent
3b87f14199
commit
da94c1e6f6
|
@ -46,7 +46,7 @@ async function submit(req, res, next) {
|
||||||
if (message.length >= 512) {
|
if (message.length >= 512) {
|
||||||
errors.push('Maximum length is 512 characters.');
|
errors.push('Maximum length is 512 characters.');
|
||||||
}
|
}
|
||||||
if (name.match(/^\s*$/g)) {
|
if (name.match(/^(\s|\u00A0|[\u2000-\u2009]|\u200A|\u2028|\u205F|\u3000)*$/g)) {
|
||||||
errors.push('Name must be specified.');
|
errors.push('Name must be specified.');
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in New Issue