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() {
|
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;
|
||||||
|
Reference in New Issue
Block a user