Skip to content

Instantly share code, notes, and snippets.

View sobchenyuk's full-sized avatar

Andrey Socbehnyuk sobchenyuk

View GitHub Profile
@sobchenyuk
sobchenyuk / form validation.js
Last active February 26, 2020 10:50
form validation
( function () {
window.addEventListener('load', formChange);
function formChange() {
let formChange = document.querySelector('#formChange');
let registerForm = document.querySelector('#registerForm');
if(formChange){
valid(formChange)
(()=>{
const filterForm = document.querySelector('#filterForm');
function submitFunc(e) {
const field = [
'region', 'towns', 'areas'
];
let select = filterForm.querySelectorAll('select');
let i = 0;