ref={register({ required: true, pattern: /^d*$/, validate: (value) => { return !!value.trim(); }, })}