Added card validation function--still need to connect to events