\subsection*{S\+Y\+N\+O\+P\+S\+IS}

{\ttfamily kdb vset $<$key name$>$ $<$value$>$ $<$regex$>$ \mbox{[}$<$message$>$\mbox{]}}

Where {\ttfamily key name} is the name of the key the user wishes to set, {\ttfamily value} is the value the user wishes to set, and {\ttfamily regex} is the regular expression that should be used for validation. The optional parameter {\ttfamily message} is a user-\/defined message that will be displayed when a user tries to set the key to a value that doesn\textquotesingle{}t match the regular expression. The expression will be matched against the whole value ({\ttfamily check/validation/match=L\+I\+NE}).

\subsection*{D\+E\+S\+C\+R\+I\+P\+T\+I\+ON}

This command allows the user to set the value of a key and create a validation regular expression which future sets are checked against. This command supports regular expressions as defined in extended regular expressions. If a user tries to set a value that does not match the regular expression, a user-\/defined message is returned.

Note\+: In order for this command to work, the {\ttfamily validation} plugin must be mounted where the key resides.

\subsection*{O\+P\+T\+I\+O\+NS}


\begin{DoxyItemize}
\item {\ttfamily -\/H}, {\ttfamily -\/-\/help}\+: Show the man page.
\item {\ttfamily -\/V}, {\ttfamily -\/-\/version}\+: Print version info.
\item {\ttfamily -\/p}, {\ttfamily -\/-\/profile $<$profile$>$}\+: Use a different kdb profile.
\item {\ttfamily -\/C}, {\ttfamily -\/-\/color $<$when$>$}\+: Print never/auto(default)/always colored output.
\end{DoxyItemize}

\subsection*{E\+X\+A\+M\+P\+L\+ES}

To mount the necessary validation plugin use\+:~\newline
 {\ttfamily kdb mount validation.\+ini /validation ini validation}

To set the {\ttfamily user/validation/key} key to the value {\ttfamily a} and validate that any future sets must match the regular expression {\ttfamily a+}\+:~\newline
 {\ttfamily kdb vset user/validation/key a a+ \char`\"{}\+The value of this key must only consist of one more of the letter a\char`\"{}}

\subsection*{S\+EE A\+L\+SO}


\begin{DoxyItemize}
\item Use {\ttfamily kdb info validation} to get information about the validation plugin.
\item \hyperlink{doc_help_elektra-key-names_md}{elektra-\/key-\/names(7)} for an explanation of key names. 
\end{DoxyItemize}