esx_identity: rename checkDate to checkDOBFormat

This commit is contained in:
Csoki
2022-11-26 21:02:03 +01:00
parent 375230f834
commit cec68f2708
+2 -7
View File
@@ -36,7 +36,8 @@ local function saveIdentityToDatabase(identifier, identity)
{identity.firstName, identity.lastName, identity.dateOfBirth, identity.sex, identity.height, identifier})
end
local function checkDate(str)
local function checkDOBFormat(str)
str = tostring(str)
if not string.match(str, '(%d%d)/(%d%d)/(%d%d%d%d)') then
return false
end
@@ -92,12 +93,6 @@ local function checkNameFormat(name)
return false
end
local function checkDOBFormat(dob)
local date = tostring(dob)
return checkDate(date)
end
local function checkSexFormat(sex)
if not sex then
return false