Skip to content
Next Next commit
Ensure we don't submit form that has empty site name
  • Loading branch information
Kateryna Kodonenko
Kateryna Kodonenko committed Apr 1, 2026
commit 2efcb9c3cbe7dfa2d67cdbea1695db6a9eff5ae1
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,9 @@ export const CreateSiteForm = ( {
onKeyDown={ ( event ) => {
if ( event.key === 'Enter' ) {
event.preventDefault();
handleFormSubmit( event as FormEvent );
if ( siteName.trim() && errorCount === 0 ) {
handleFormSubmit( event as FormEvent );
}
}
} }
data-testid="site-name-input"
Expand Down
Loading