Added check in contacts.replace() to validate the field after entering the new value into it.
Added automatic test in replaceStr()