before validation