Validate inflix string