How to validate form when the html code is written in javascript?

I am using JBOX . jbox html code written in javscript code if the code is written in javascript code so how i validate them.

The javascript code is here

new jBox(‘Modal’, {
attach: ‘#Modal-7’,
width: 800,
height: 305,
blockScroll: false,
animation: ‘zoomOut’,
draggable: ‘title’,
closeButton: true,
content: ,
title: ‘Walk In’,
title: ‘New Customer’,
overlay: false,
reposition: false,
repositionOnOpen: false

});

I don’t know about Jbox, but I found this resource useful:
https://www.tutorialspoint.com/javascript/javascript_form_validations.htm