# WaveShieldAPI.IsValidExecution

This is a security validation function that verifies whether the execution of a specific function or operation is legitimate and safe within the FiveM environment. It's designed to prevent unauthorized function execution and detect injection attacks. You can use it in any client-side function, preferably in critical functions that executes potential exploitable actions such as spawning entities, triggering events, etc.

## Syntax:

```lua
--@param functionName string The function name to check
--@return isValidExecution boolean Wether the execution is valid or not
local isValidExecution = WaveShieldAPI.IsValidExecution(functionName)

```

## Usage Example:

```lua
function ESX.Game.SpawnObject(object, coords, cb, networked)
    if not WaveShieldAPI.IsValidExecution("SpawnObject") then
        return --Block Execution, WaveShield will automatically ban the player.
    end

    local model = type(object) == "number" and object or joaat(object)

    ESX.Streaming.RequestModel(model)

    local obj = CreateObject(model, coords.x, coords.y, coords.z, networked == nil or networked, false, true)
    return cb and cb(obj) or obj
end
```
