message: fix(origin-ui-core): beneficiary form validation and localization
diff: @@ -16,12 +16,6 @@ import * as Yup from 'yup';
  import { MaterialDatePicker } from '../../Form/MaterialDatePicker';
  import { getCountryName } from '../../../utils/countries';
  -const validationSchema = Yup.object({
  - beneficiary: Yup.string().required().label('Beneficiary'),
  - address: Yup.string().required().label('Address'),
  - zipCode: Yup.string().required().label('Beneficiary')
  -});
  -
  interface IProps {
  data: IClaimData;
  setData: (data: IClaimData) => void;
  @@ -34,6 +28,11 @@ export function BeneficiaryForm(props: IProps): JSX.Element {
  const { t } = useTranslation();
  + const validationSchema = Yup.object({
  + beneficiary: Yup.string().required().label(t('certificate.properties.beneficiary')),
  + location: Yup.string().required().label(t('certificate.properties.location'))
  + });
  +
  const { register, formState } = useForm({
  mode: 'onBlur',
  resolver: yupResolver(validationSchema),
  @@ -57,7 +56,6 @@ export function BeneficiaryForm(props: IProps): JSX.Element {
  }
  return (
  - <>
  <form>
  <TextField
  label={t('certificate.properties.beneficiary')}
  @@ -73,11 +71,11 @@ export function BeneficiaryForm(props: IProps): JSX.Element {
  <TextField
  label={t('certificate.properties.location')}
  value={data.location ?? ''}
  - name="address"
  + name="location"
  error={Boolean(errors.location)}
  helperText={errors.location?.message}
  inputRef={register}
  - onChange={(e) => setField('address', e.target.value as string)}
  + onChange={(e) => setField('location', e.target.value as string)}
  className="mt-4"
  fullWidth
  />
  @@ -116,6 +114,5 @@ export function BeneficiaryForm(props: IProps): JSX.Element {
  </Select>
  </FormControl>
  </form>
  - </>
  );
  }
  