Skip to content

Commit

Permalink
Merge pull request #49 from web-pyjs/search
Browse files Browse the repository at this point in the history
Change Search key, fix docs and readme
  • Loading branch information
nsoufian committed Feb 6, 2019
2 parents 8ab7b3b + 9c19580 commit 34fbc59
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 9 deletions.
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,23 @@ const User = Schema({
username: Field()
.string()
.alphaNum()
.required({ constraint: When("#email", Field().none()) }),
.required({
constraint: When(
"#email", Field()
.any()
.none()
)
}),
email: Field()
.string()
.email()
.required({ constraint: When("#username", Field().none()) }),
.required({
constraint: When(
"#username", Field()
.any()
.none()
)
}),
password: Field()
.string()
.min(6)
Expand Down Expand Up @@ -159,3 +171,28 @@ In general, we follow the "fork-and-pull" Git workflow.
### License (MIT)
```
MIT License

Copyright (c) 2019 soufiane nassih

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

```
2 changes: 1 addition & 1 deletion docs/guides/field.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Field().object(); // Chain your rules after this
```javascript
import { Field } from "v4f"; // ES6

Field().any; // Chain your rules after this
Field().any(); // Chain your rules after this
```

<!--END_DOCUSAURUS_CODE_TABS-->
Expand Down
14 changes: 12 additions & 2 deletions docs/introduction/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,23 @@ const User = Schema({
.string()
.alphaNum()
.required({
constraint: When("#email", Field().none())
constraint: When(
"#email",
Field()
.any()
.none()
)
}),
email: Field()
.string()
.email()
.required({
constraint: When("#username", Field().none())
constraint: When(
"#username",
Field()
.any()
.none()
)
}),
password: Field()
.string()
Expand Down
4 changes: 2 additions & 2 deletions website/core/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ class Footer extends React.Component {
</div>
<div>
<h5>More</h5>
<a href="https://github.com/">GitHub</a>
<a href="https://github.com/web-pyjs/v4f">GitHub</a>
<a
className="github-button"
href={this.props.config.repoUrl}
data-icon="octicon-star"
data-count-href="/facebook/docusaurus/stargazers"
data-count-href="/web-pyjs/v4f/stargazers"
data-show-count="true"
data-count-aria-label="# stargazers on GitHub"
aria-label="Star this project on GitHub"
Expand Down
5 changes: 3 additions & 2 deletions website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const siteConfig = {
title: "4 Forms", // Title for your website.
tagline:
"A declarative, efficient, and flexible JavaScript validation library for Humans",
url: "https://v4f.js.org", // Your website URL
url: "https://v4f.js.org/", // Your website URL
baseUrl: "/", // Base URL for your project */
// For github.io type URLs, you would set the url and baseUrl like:
// url: 'https://facebook.github.io',
Expand All @@ -24,7 +24,7 @@ const siteConfig = {
projectName: "v4f",
organizationName: "web-pyjs",
algolia: {
apiKey: "9c56ddc6a89b21d19e976e0ba978259f",
apiKey: "fb633717b2157b08599bddabf1eefc29",
indexName: "v4f",
algoliaOptions: {} // Optional, if provided by Algolia
},
Expand Down Expand Up @@ -93,6 +93,7 @@ const siteConfig = {
cleanUrl: true,
docsSideNavCollapsible: true,
usePrism: ["javascript"],
repoUrl: "https://github.com/web-pyjs/v4f",

// Open Graph and Twitter card images.
ogImage: "img/mini-logo.png",
Expand Down

0 comments on commit 34fbc59

Please sign in to comment.