mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
add empty subspace validation
This commit is contained in:
@ -52,6 +52,13 @@ class _SubspaceNameDisplayWidgetState extends State<SubspaceNameDisplayWidget> {
|
||||
|
||||
void _handleValidationAndSave() {
|
||||
final updatedName = _controller.text;
|
||||
|
||||
if (updatedName.isEmpty) {
|
||||
setState(() {
|
||||
errorText = 'Subspace name cannot be empty.';
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (widget.validateName(updatedName)) {
|
||||
setState(() {
|
||||
errorText = null;
|
||||
|
Reference in New Issue
Block a user