{{newin|[[11.0]]|110|type=function}}
Validates shader code. Check if specified shader code does not contain any errors.

== Function ==
=== Synopsis ===
<source lang="lua">
status, message = love.graphics.validateShader( gles, code )
</source>
=== Arguments ===
{{param|boolean|gles|Validate code as GLSL ES shader.}}
{{param|string|code|The pixel shader or vertex shader code, or a filename pointing to a file with the code.}}
=== Returns ===
{{param|boolean|status|<code>true</code> if specified shader code doesn't contain any errors. <code>false</code> otherwise.}}
{{param|string|message|Reason why shader code validation failed (or <code>nil</code> if validation succeded).}}

== Function ==
=== Synopsis ===
<source lang="lua">
status, message = love.graphics.validateShader( gles, pixelcode, vertexcode )
</source>
=== Arguments ===
{{param|boolean|gles|Validate code as GLSL ES shader.}}
{{param|string|pixelcode|The pixel shader code, or a filename pointing to a file with the code.}}
{{param|string|vertexcode|The vertex shader code, or a filename pointing to a file with the code.}}
=== Returns ===
{{param|boolean|status|<code>true</code> if specified shader code doesn't contain any errors. <code>false</code> otherwise.}}
{{param|string|message|Reason why shader code validation failed (or <code>nil</code> if validation succeded).}}

== See Also ==
* [[parent::love.graphics]]
* [[love.graphics.newShader]]
[[Category:Functions]]
[[Sub-Category::Object Creation| ]]
{{#set:Description=Validates shader code.}}

== Other Languages ==
{{i18n|love.graphics.validateShader}}