add empty subspace validation

This commit is contained in:
hannathkadher
2025-01-30 15:00:40 +04:00
parent a294988558
commit bf5b39e742

View File

@ -52,6 +52,13 @@ class _SubspaceNameDisplayWidgetState extends State<SubspaceNameDisplayWidget> {
void _handleValidationAndSave() { void _handleValidationAndSave() {
final updatedName = _controller.text; final updatedName = _controller.text;
if (updatedName.isEmpty) {
setState(() {
errorText = 'Subspace name cannot be empty.';
});
return;
}
if (widget.validateName(updatedName)) { if (widget.validateName(updatedName)) {
setState(() { setState(() {
errorText = null; errorText = null;