mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
esx_identity: rename checkDate to checkDOBFormat
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user