Project

General

Profile

« Previous | Next » 

Revision 1997

Fixed validation check for samplingDescription.

View differences:

src/perl/register-dataset.cgi
637 637
    # and long mentioned in the config file. 
638 638

  
639 639
    if ($FORM::useSiteCoord) {
640
    push(@invalidParams, "The Data Registry doesn't have latitude and longitude information for the site that you choose. Please go back and enter the spatial information.")
640
    push(@invalidParams, "The Data Registry doesn't have latitude and longitude information for the site that you chose. Please go back and enter the spatial information.")
641 641
        unless(hasContent($latDeg1) && hasContent($longDeg1));
642 642
    }else{
643 643
    push(@invalidParams, "Latitude degrees are missing.")
......
654 654
        if (hasContent($FORM::studyExtentDescription) && !(scalar(@FORM::methodPara) > 0));
655 655
    push(@invalidParams, 
656 656
        "You must provide both a study extent description and a sampling description, or neither.")
657
        unless (hasContent($FORM::studyExtentDescription) && hasContent($FORM::samplingDescription));
657
        if (
658
                (hasContent($FORM::studyExtentDescription) && !hasContent($FORM::samplingDescription)) ||
659
                (!hasContent($FORM::studyExtentDescription) && hasContent($FORM::samplingDescription))
660
           );
658 661

  
659 662
    push(@invalidParams, "Contact first name is missing.")
660 663
    unless (hasContent($FORM::origNamefirstContact) || 

Also available in: Unified diff