Validation Code

Not done, but started
Works with validation