Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ export const CustomSectionForm: React.FC<CustomSectionFormProps> = ({
<Field
as={TextField}
name="subtitle"
label="Subtitle"
required
label="Subtitle (Optional)"
fullWidth
multiline
rows={2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const getValidationSchema = (isEditMode: boolean = false) => {
subtitle: yup
.string()
.trim()
.required('Subtitle is required')
.max(500, 'Subtitle cannot exceed 500 characters'),

heroTitle: yup
Expand Down Expand Up @@ -95,10 +94,6 @@ export const validateForm = (
errors.title = 'Title is required';
}

if (!formData.subtitle.trim()) {
errors.subtitle = 'Subtitle is required';
}

if (!formData.startDate) {
errors.startDate = 'Start date is required';
} else if (formData.startDate < today) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ describe('EditCustomSectionModal', () => {
</MockedProvider>,
);

// Check if form text labels are rendered (from CustomSectionFormConnector)
expect(screen.getByText('Title')).toBeInTheDocument();
expect(screen.getByText('Subtitle')).toBeInTheDocument();
// Check if form is rendered - looking for start date label
expect(screen.getByText('Start Date')).toBeInTheDocument();
});

it('should populate form with section data', () => {
Expand Down