Validate function added to export dialog

Fix #534
A validate function is now added to exporter.js