added validateEdit to scan.py