Validation

Added all validations and fixed the credit action