scripts/validate.js
/**
 * This method validates the form on create.php 
 */
This method validates the form on create.php
This method validates the form on create . php
function validateCreate(){
    var textInputs = [
        email = document.forms["createForm"]["email"].value,
        password = document.forms["createForm"]["password"].value,
        fname = document.forms["createForm"]["fname"].value,
        lname = document.forms["createForm"]["lname"].value
    ];
    var numberInputs = [
       wallet = document.forms["createForm"]["wallet"].value
    ];
    textInputs.forEach(validateClientSide());
    numberInputs.forEach(validateNumericOnly());
}
function validateCreate ( ) { var textInputs = [ email = document . forms [ "createForm" ] [ "email" ] . value , password = document . forms [ "createForm" ] [ "password" ] . value , fname = document . forms [ "createForm" ] [ "fname" ] . value , lname = document . forms [ "createForm" ] [ "lname" ] . value ] ; var numberInputs = [ wallet = document . forms [ "createForm" ] [ "wallet" ] . value ] ; textInputs . forEach ( validateClientSide ( ) ) ; numberInputs . forEach ( validateNumericOnly ( ) ) ; }
This method validates the form on create.php
This method validates the form on create . php