Using these validations:
```

// globalny kill switch do debugowania walidacji (zwraca zawsze sukces)
const debugMode = false;

export const requiredField = (msg) => {
    return {
        required: true,
        message: msg,
        validator: (_, value) => {
            if (debugMode) return Promise.resolve();
            if (value) return Promise.resolve();
            return Promise.reject(new Error(msg));
        },
    };
};

export const validatePassword = {
    validator: (_, value) => {
        if (debugMode) return Promise.resolve();
        if (value && value.length >= 6) {
            return Promise.resolve();
        }
        return Promise.reject(new Error('Password must be at least 6 characters'));
    },
};

export const validateConfirmPasssword = (getFieldValue) => ({
    validator(_, value) {
        if (debugMode) return Promise.resolve();
        if (!value || getFieldValue('newPassword') === value) {
            return Promise.resolve();
        }
        return Promise.reject(new Error('The two passwords that you entered do not match!'));
    },
});


export const polishPhoneValidation = {
    pattern: /^[0-9]{9}$/,
    message: 'Enter a valid Polish phone number (9 digits)',
    validator: (_, value) => {
        if (debugMode) return Promise.resolve();
        if (value && polishPhoneValidation.pattern.test(value)) {
            return Promise.resolve();
        }
        return Promise.reject(new Error(polishPhoneValidation.message));
    },
};

export const swedishPhoneValidation = {
    pattern: /^[0-9]{9,10}$/,
    message: 'Enter a valid Swedish phone number (9-10 digits)',
    validator: (_, value) => {
        if (debugMode) return Promise.resolve();
        if (value && swedishPhoneValidation.pattern.test(value)) {
            return Promise.resolve();
        }
        return Promise.reject(new Error(swedishPhoneValidation.message));
    },
};

export const universalFieldValidation = (fieldName) => ({
    pattern: /^[A-Za-zÀ-ÖØ-öø-ÿ\s'-]+$/,
    max: 50,
    message: `Enter a valid ${fieldName} (max 50 characters)`,
    validator: (_, value) => {
        if (debugMode) return Promise.resolve();
        if (value && universalFieldValidation(fieldName).pattern.test(value) && value.length <= universalFieldValidation(fieldName).max) {
            return Promise.resolve();
        }
        return Promise.reject(new Error(universalFieldValidation(fieldName).message));
    },
});

export const validatePESEL = {
    validator: (_, value) => {
        if (debugMode) return Promise.resolve();
        if (!value) return Promise.resolve();

        const peselPattern = /^[0-9]{11}$/;
        if (!peselPattern.test(value)) {
            return Promise.reject(new Error('PESEL must consist of exactly 11 digits.'));
        }

        // walidatcja daty urodzenia w PESEL
        const year = parseInt(value.substring(0, 2), 10);
        const month = parseInt(value.substring(2, 4), 10) % 20;
        const day = parseInt(value.substring(4, 6), 10);

        const currentYear = new Date().getFullYear() % 100;
        const century = month > 12 ? 2000 : (year <= currentYear ? 1900 : 1800);
        const fullYear = century + year;

        const birthDate = new Date(fullYear, month - 1, day);
        if (birthDate.getFullYear() !== fullYear || birthDate.getMonth() + 1 !== month || birthDate.getDate() !== day) {
            return Promise.reject(new Error('Invalid PESEL date.'));
        }

        // checksum PESEL'u
        const weights = [1, 3, 7, 9, 1, 3, 7, 9, 1, 3];
        const sum = value.split('').reduce((acc, digit, idx) => {
            if (idx < 10) {
                acc += parseInt(digit, 10) * weights[idx];
            }
            return acc;
        }, 0);
        const checksum = (10 - (sum % 10)) % 10;

        if (checksum !== parseInt(value.charAt(10), 10)) {
            return Promise.reject(new Error('Invalid PESEL checksum.'));
        }

        return Promise.resolve();
    },
    message: 'Invalid PESEL number.',
};

export const validateNIP = {
    validator: (_, value) => {
        if (debugMode) return Promise.resolve();
        if (!value) return Promise.resolve();

        const nipPattern = /^[0-9]{10}$/;
        if (!nipPattern.test(value)) {
            return Promise.reject(new Error('NIP must consist of exactly 10 digits.'));
        }

        // checksum NIP'u
        const weights = [6, 5, 7, 2, 3, 4, 5, 6, 7];
        const sum = value.split('').reduce((acc, digit, idx) => {
            if (idx < 9) {
                acc += parseInt(digit, 10) * weights[idx];
            }
            return acc;
        }, 0);
        const checksum = sum % 11;

        if (checksum !== parseInt(value.charAt(9), 10)) {
            return Promise.reject(new Error('Invalid NIP checksum.'));
        }

        return Promise.resolve();
    },
    message: 'Invalid NIP number.',
};

export const validateEmail = {
    validator: (_, value) => {
        if (debugMode) return Promise.resolve();
        if (!value) return Promise.resolve();

        const emailPattern = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;

        if (!emailPattern.test(value)) {
            return Promise.reject(new Error('Invalid email format.'));
        }

        return Promise.resolve();
    },
    message: 'Please enter a valid email address.',
};

```


Rewrite these inputs so some of them are validated. Don't break frontend composition of forms
```
import React, { useEffect, useState } from "react";
import { Link, useParams } from "react-router-dom";
import AmberBox from "../../Components/AmberBox";
import { Input, Select, Button, AutoComplete } from "antd";
import Axios from "axios";

const { Option } = Select;

export default function EdytujProjektPage() {
    const [availableGroups, setAvailableGroups] = useState([]);
    const [availableProjects, setAvailableProjects] = useState([]);
    const { id } = useParams();

    const [form, setForm] = useState({
        firma: '1',
        zleceniodawca: '',
        nazwa: '',
        kodProjektu: '',
        ulica: '',
        miejscowosc: '',
        kodPocztowy: '',
        kraj: ''
    });

    const fetchGroups = () => {
        Axios.get("http://localhost:5000/api/grupy", { withCredentials: true })
            .then((response) => {
                const transformedData = response.data.grupy.map(grupy => ({
                    name: grupy.Zleceniodawca,
                    value: grupy.id
                }));
                setAvailableGroups(transformedData);
            })
            .catch((error) => {
                console.error(error);
            });
    };

    const fetchProjects = () => {
        Axios.get("http://localhost:5000/api/czas/projekty", { withCredentials: true })
            .then((response) => {
                const transformedDataProjects = response.data.projekty.map(projekty => ({
                    name: projekty.NazwaKod_Projektu,
                    value: projekty.idProjekty
                }));
                setAvailableProjects(transformedDataProjects);
            })
            .catch((error) => {
                console.error(error);
            });
    };

    const fetchProjectData = (projectId) => {
        Axios.get(`http://localhost:5000/api/czas/projekty/${projectId}`, { withCredentials: true })
            .then((response) => {
                if (response.data && Array.isArray(response.data) && response.data.length > 0) {
                    const project = response.data[0];
                    setForm({
                        firma: project.Firma_idFirma || '1',
                        zleceniodawca: project.Grupa_urlopowa_idGrupa_urlopowa || '',
                        nazwa: project.NazwaKod_Projektu || '',
                        kodProjektu: project.NazwaKod_Projektu || '',
                        ulica: project.Ulica || '',
                        miejscowosc: project.Miejscowosc || '',
                        kodPocztowy: project.Kod_pocztowy || '',
                        kraj: project.Kraj || ''
                    });
                    console.log(project);
                }
            })
            .catch((error) => {
                console.error('Error fetching project:', error);
            });
    };

    useEffect(() => {
        fetchGroups();
        fetchProjects();
        fetchProjectData(id);
    }, [id]);

    const handleSave = () => {
        Axios.put(`http://localhost:5000/api/czas/edytujProjekt/${id}`, form, { 
            withCredentials: true 
        })
        .then(res => {
            window.location.href = "/home/projekty";
        })
        .catch(err => {
            console.error("Error updating project:", err.response ? err.response.data : err.message);
        });
    };

    const handleChange = (value, field) => {
        setForm(prevState => ({
            ...prevState,
            [field]: value
        }));
    };

    return (
        <div>
            <div className="w-auto h-auto bg-blue-700 outline outline-1 outline-black flex flex-row items-center space-x-4 m-2 p-3 text-white">
                <p>Edytuj projekt</p>
            </div>
            <AmberBox>
                <div className="flex flex-col items-center space-y-8 p-4 w-full">

                    <div className="w-full md:w-6/12 lg:w-4/12">
                        <label htmlFor="firma">Firma</label>
                        <Select
                            onChange={(value) => handleChange(value, 'firma')}
                            className="w-full"
                            value={form.firma}
                            showSearch
                            allowClear
                        >
                            <Option key={1} value={1}>
                                PC Husbyggen
                            </Option>
                        </Select>
                    </div>

                    <div className="w-full md:w-6/12 lg:w-4/12">
                        <label htmlFor="zleceniodawca">Zleceniodawca</label>
                        <Select
                            onChange={(value) => handleChange(value, 'zleceniodawca')}
                            className="w-full"
                            value={form.zleceniodawca}
                            showSearch
                            allowClear
                        >
                            {availableGroups.map((group) => (
                                <Option key={group.value} value={group.value}>
                                    {group.name}
                                </Option>
                            ))}
                        </Select>
                    </div>

                    <div className="w-full md:w-6/12 lg:w-4/12">
                        <label htmlFor="nazwa">Nazwa/Kod Projektu</label>
                        <AutoComplete
                            onChange={(value) => handleChange(value, 'nazwa')}
                            className="w-full"
                            value={form.nazwa}
                            options={availableProjects.map(project => ({
                                value: project.value,
                                label: project.name
                            }))}
                            placeholder="Wybierz projekt"
                            filterOption={(inputValue, option) =>
                                option.label.toLowerCase().includes(inputValue.toLowerCase())
                            }
                            allowClear
                        />
                    </div>

                    <div className="w-full md:w-6/12 lg:w-4/12">
                        <label htmlFor="ulica">Ulica</label>
                        <Input onChange={(e) => handleChange(e.target.value, 'ulica')} value={form.ulica} />
                    </div>

                    <div className="w-full md:w-6/12 lg:w-4/12">
                        <label htmlFor="miejscowosc">Miejscowość</label>
                        <Input onChange={(e) => handleChange(e.target.value, 'miejscowosc')} value={form.miejscowosc} />
                    </div>

                    <div className="w-full md:w-6/12 lg:w-4/12">
                        <label htmlFor="kodPocztowy">Kod pocztowy</label>
                        <Input onChange={(e) => handleChange(e.target.value, 'kodPocztowy')} value={form.kodPocztowy} />
                    </div>

                    <div className="w-full md:w-6/12 lg:w-4/12">
                        <label htmlFor="kraj">Kraj</label>
                        <Input onChange={(e) => handleChange(e.target.value, 'kraj')} value={form.kraj} />
                    </div>

                    <div className="flex space-x-4 mt-8">
                        <Button type="primary" onClick={handleSave}>Zapisz</Button>
                        <Link to="/home/projekty">
                            <Button>Anuluj</Button>
                        </Link>
                    </div>
                </div>
            </AmberBox>
        </div>
    );
}
```