fix check functions

This commit is contained in:
Csoki
2022-11-26 20:30:45 +01:00
parent 176de7a52e
commit 2540a8a1d2
+4 -1
View File
@@ -99,11 +99,14 @@ local function checkDOBFormat(dob)
end
local function checkSexFormat(sex)
if not sex then
return false
end
return sex == "m" or sex == "M" or sex == "f" or sex == "F"
end
local function checkHeightFormat(height)
local numHeight = tonumber(height)
local numHeight = tonumber(height) or 0
return numHeight >= Config.MinHeight and numHeight <= Config.MaxHeight
end