$(document).ready(function(){
    /**
     * 
     * @returns 
     */
    $.fn.validations = function(){
        return [
            {
                "name":"noEmpty",
                "message":window.translations["create-payment-method"].fieldRequired,
                "run":function (field){
                    return ((field.value != undefined) && (field.value.trim() !== "")); 
                }
            }
        ];
    }
    $("#Currency").on("submit",function(e){
        let form    = document.querySelector("#Currency");
        let data    = $.fn.getDataForm.call(this,form);
        let valid   = $.fn.runValidations(data,$.fn.validations());
        if(!valid.valid)
            e.preventDefault();
    });
})