[#BloombergLP-baljsn-EncodeImplUtil-validate-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/EncodeImplUtil.adoc[EncodeImplUtil]::validate
:relfileprefix: ../../../
:mrdocs:

`validate` overloads

== Synopses

Declared in `&lt;baljsn&lowbar;encodeimplutil&period;h&gt;`

Determine whether `value` meets the encoding requirements for `category`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
static
int
xref:BloombergLP/baljsn/EncodeImplUtil/validate-06.adoc[validate](
    std::ostream* logStream,
    TYPE const& value,
    xref:BloombergLP/bdlat_TypeCategory/Choice.adoc[bdlat&lowbar;TypeCategory::Choice] category);
----

[.small]#xref:BloombergLP/baljsn/EncodeImplUtil/validate-06.adoc[_» more&period;&period;&period;_]#

Same as the preceding `validate` overload for the specified `category`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TYPE,
    class CATEGORY&gt;
static
int
xref:BloombergLP/baljsn/EncodeImplUtil/validate-0e.adoc[validate](
    std::ostream* logStream,
    TYPE const& value,
    CATEGORY category);
----

[.small]#xref:BloombergLP/baljsn/EncodeImplUtil/validate-0e.adoc[_» more&period;&period;&period;_]#

== Return Value

0 if valid, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *logStream*
| stream for human&hyphen;readable error descriptions
| *value*
| value to validate for encoding
| *category*
| `bdlat` Choice type&hyphen;category tag
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
