function validateForm() {

    const title = document.forms.pictureuploadform.title.value.trim();
    const description = document.forms.pictureuploadform.description.value;
    const tags = document.forms.pictureuploadform.tags;

    const titleMaxLength = 128;
    if (title.length === 0 || title.length > titleMaxLength) {
        console.log("Error title length = " + title.length);
        return false;
    };

    const descriptionMaxLength = 2048;
    if (description.length > descriptionMaxLength) {
        console.log("Error description length = " + description.length);
        return false;
    };

    const tagsMaxLength = 8;
    if (tags.length > tagsMaxLength) {
        console.log("Error tags length = " + description.length);
        return false;
    };

    fileValid = true;

    return fileValid;
}
// Validating the users input for the upload of the pictures.

Validating the users input for the upload of the pictures.
Validating the users input for the upload of the pictures .
function validateForm() {
    const title = document.forms.pictureuploadform.title.value.trim();
    const description = document.forms.pictureuploadform.description.value;
    const tags = document.forms.pictureuploadform.tags;
    const titleMaxLength = 128;
    if (title.length === 0 || title.length > titleMaxLength) {
        console.log("Error title length = " + title.length);
        return false;
    };
    const descriptionMaxLength = 2048;
    if (description.length > descriptionMaxLength) {
        console.log("Error description length = " + description.length);
        return false;
    };
    const tagsMaxLength = 8;
    if (tags.length > tagsMaxLength) {
        console.log("Error tags length = " + description.length);
        return false;
    };
    fileValid = true;
    return fileValid;
}
function validateForm ( ) { const title = document . forms . pictureuploadform . title . value . trim ( ) ; const description = document . forms . pictureuploadform . description . value ; const tags = document . forms . pictureuploadform . tags ; const titleMaxLength = 128 ; if ( title . length === 0 || title . length > titleMaxLength ) { console . log ( "Error title length = " + title . length ) ; return false ; } ; const descriptionMaxLength = 2048 ; if ( description . length > descriptionMaxLength ) { console . log ( "Error description length = " + description . length ) ; return false ; } ; const tagsMaxLength = 8 ; if ( tags . length > tagsMaxLength ) { console . log ( "Error tags length = " + description . length ) ; return false ; } ; fileValid = true ; return fileValid ; }
Validating the users input for the upload of the pictures.
Validating the users input for the upload of the pictures .