Hello,
I have the following form, but for some reason the button is not triggering the method execution neither the validator regex is working. some help would be greatly appreciated.
const inputRegex = new RegExp(/^([a-zA-Z\d\.,%/\-_].*)/);
const inputValidator = (value) =>
inputRegex.test(value) ? "" : "Please enter a valid value.";
return (
<Form className="mt-3 mb-4 px-0" onSubmit={postCompressorSave}
render={(formRenderProps) => (
<FormElement
style={{
maxWidth: 650,
}}
>
<fieldset className={"k-form-fieldset"}>
<legend className={"k-form-legend"}>
Please fill in the email field:
</legend>
<div className="mb-3">
<Field
name={"nikname"}
component={NicknameInput}
label={"NickName"}
validator={inputValidator}
/>
</div>
</fieldset>
<div className="k-form-buttons">
<button type={"submit"} className="btn btn-outline-success btn-block mt-1"
style={{height: "30px", fontSize: "16px", paddingTop: "4px"}}>
Save
</button>
</div>
</FormElement>
)}
/>
)
}