validation code pre-realise 1