diff --git a/src/BootstrapForm.php b/src/BootstrapForm.php
index <HASH>..<HASH> 100644
--- a/src/BootstrapForm.php
+++ b/src/BootstrapForm.php
@@ -809,7 +809,7 @@ class BootstrapForm
     public function flattenFieldName($field)
     {
         return preg_replace_callback("/\[(.*)\\]/U", function ($matches) {
-            if (isset($matches[1])) {
+            if (!empty($matches[1]) || $matches[1] === '0') {
                 return "." . $matches[1];
             }
         }, $field);
diff --git a/tests/BootstrapFormTest.php b/tests/BootstrapFormTest.php
index <HASH>..<HASH> 100644
--- a/tests/BootstrapFormTest.php
+++ b/tests/BootstrapFormTest.php
@@ -192,6 +192,14 @@ class BootstrapFormTest extends PHPUnit_Framework_TestCase
 
         $this->assertEquals('foo.bar', $result);
     }
+    
+    /** @test */
+    public function in_allows_zero_in_field_name()
+    {
+        $result = $this->bootstrapForm->flattenFieldName('foo[0]');
+
+        $this->assertEquals('foo.0', $result);
+    }
 
     /** @test */
     public function it_flattens_nested_array_from_field_name()
Allow 0 in field name and add a test