You will need to provide your own property editor.
See org.eclipse.wb.internal.core.model.property.editor.IntegerPr opertyEditor as example. Its setEditorText() tries to parse String into Integer and show exception in other case. You can do the same.
You will need to register your property editor with ID, see for example how org.eclipse.wb.internal.core.model.property.editor.StringLis tPropertyEditor is registered in plugin.xml