mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
fix front-end validation
This commit is contained in:
@@ -16,7 +16,7 @@ const home = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function roomCodeIsValid (code) {
|
function roomCodeIsValid (code) {
|
||||||
return typeof code === 'string' && /^[A-Z0-9]{6}$/.test(code.toUpperCase().trim());
|
return typeof code === 'string' && /^[A-Z0-9]{4}$/.test(code.toUpperCase().trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
function attemptToJoinGame (code) {
|
function attemptToJoinGame (code) {
|
||||||
|
|||||||
Reference in New Issue
Block a user