Filters are stored inside tmt.validator.filters, a JavaScript object, acting as a container for both built-in and custom filters. In order to add our own, we can call the tmt.validator.createFilter function. The tmt.validator.createFilter() function requires 2 arguments
<script type="text/javascript">
tmt.validator.filters.a_to_f = tmt.validator.createFilter("[^a-fA-F]", "");
</script>