Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (34 sloc) 2.05 KB
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<database name="bookstore-behavior" defaultIdMethod="native" package="behavior.validate" namespace="Propel\Tests\Bookstore\Behavior">
<table name="validate_trigger_book" description="Book Table">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" description="Book Id" />
<column name="title" type="VARCHAR" required="true" description="Book Title" primaryString="true" />
<column name="isbn" type="VARCHAR" size="24" phpName="ISBN" description="ISBN Number" primaryString="false" />
<column name="price" required="false" type="FLOAT" description="Price of the book." />
<column name="publisher_id" required="false" type="INTEGER" description="Foreign Key Publisher" />
<column name="author_id" required="false" type="INTEGER" description="Foreign Key Author" />
<behavior name="validate">
<parameter name="rule1" value="{column: title, validator: NotNull}" />
<parameter name="rule2" value="{column: isbn, validator: Regex, options: {pattern: &quot;/[^\d-]+/&quot;, match: false, message: Please enter a valid ISBN }}" />
</behavior>
<behavior name="i18n">
<parameter name="i18n_columns" value="title" />
</behavior>
</table>
<table name="validate_trigger_fiction">
<behavior name="concrete_inheritance">
<parameter name="extends" value="validate_trigger_book" />
</behavior>
<column name="foo" type="VARCHAR" size="100"/>
</table>
<table name="validate_trigger_comic">
<behavior name="concrete_inheritance">
<parameter name="extends" value="validate_trigger_book" />
</behavior>
<column name="bar" type="VARCHAR" size="100"/>
<behavior name="validate">
<parameter name="rule1" value="{column: bar, validator: NotNull}" />
<parameter name="rule2" value="{column: bar, validator: Type, options: {type: string }}" />
</behavior>
</table>
</database>
Something went wrong with that request. Please try again.