add conditional

if ! [[ "$HAXE_VERSION" =~ ^[0-9]+(\.[0-9]+)+(\.[0-9]+)?$ ]];
checks for x.x.x input not letter or single number